vscode-utils: allow hash
to be used in mktplcRef
SRI hashes are the new standard throughout Nixpkgs. Although `sha256` can be set to an SRI hash, it would be better to start using the generic attribute everywhere instead. Change-Id: Ie4fdd1e8bf7082d2d73802253c9aec45f99b1b96
This commit is contained in:
parent
d20ddd76a4
commit
d9d0e40aeb
@ -1,10 +1,10 @@
|
||||
{ publisher, name, version, arch ? "", sha256 ? "" }:
|
||||
{ publisher, name, version, arch ? "", sha256 ? "", hash ? "" }:
|
||||
let
|
||||
archurl = (if arch == "" then "" else "?targetPlatform=${arch}");
|
||||
in
|
||||
{
|
||||
url = "https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage${archurl}";
|
||||
sha256 = sha256;
|
||||
inherit sha256 hash;
|
||||
# The `*.vsix` file is in the end a simple zip file. Change the extension
|
||||
# so that existing `unzip` hooks takes care of the unpacking.
|
||||
name = "${publisher}-${name}.zip";
|
||||
|
@ -74,6 +74,7 @@ let
|
||||
"publisher"
|
||||
"version"
|
||||
"sha256"
|
||||
"hash"
|
||||
"arch"
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user