1{
2 publisher,
3 name,
4 version,
5 arch ? "",
6 sha256 ? "",
7 hash ? "",
8}:
9let
10 archurl = (if arch == "" then "" else "?targetPlatform=${arch}");
11in
12{
13 url = "https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage${archurl}";
14 inherit sha256 hash;
15 # The `*.vsix` file is in the end a simple zip file. Change the extension
16 # so that existing `unzip` hooks takes care of the unpacking.
17 name = "${publisher}-${name}.zip";
18}