2022-06-21 23:23:39 +00:00
|
|
|
{ publisher, name, version, arch ? "", sha256 ? "" }:
|
|
|
|
let
|
|
|
|
archurl = (if arch == "" then "" else "?targetPlatform=${arch}");
|
|
|
|
in
|
2019-12-24 18:15:15 +00:00
|
|
|
{
|
2022-06-21 23:23:39 +00:00
|
|
|
url = "https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage${archurl}";
|
2019-12-28 21:40:13 +00:00
|
|
|
sha256 = sha256;
|
2019-12-24 18:15:15 +00:00
|
|
|
# The `*.vsix` file is in the end a simple zip file. Change the extension
|
|
|
|
# so that existing `unzip` hooks takes care of the unpacking.
|
2019-12-28 21:40:13 +00:00
|
|
|
name = "${publisher}-${name}.zip";
|
2019-12-24 18:15:15 +00:00
|
|
|
}
|