Merge pull request #301936 from deviant/mktplcref-hash

vscode-utils: allow hash to be used in mktplcRef
This commit is contained in:
superherointj 2024-04-05 19:31:54 -03:00 committed by GitHub
commit 368ac1e650
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 277 additions and 276 deletions

View File

@ -9,7 +9,7 @@ in
name = "vscode-wakatime";
publisher = "WakaTime";
version = "18.0.5";
sha256 = "sha256-vWqGxMbxKqd4UgKK0sOKadMTDf6Y3TQxfWsc93MHjFs=";
hash = "sha256-vWqGxMbxKqd4UgKK0sOKadMTDf6Y3TQxfWsc93MHjFs=";
};
meta = {

View File

@ -13,7 +13,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
name = "rescript-vscode";
publisher = "chenglou92";
inherit version;
sha256 = "sha256-Dt7mqZQ/vEUFyUD5SsY6RGzg9kq19/Amksrwtfv0TuE=";
hash = "sha256-Dt7mqZQ/vEUFyUD5SsY6RGzg9kq19/Amksrwtfv0TuE=";
};
postPatch = ''
rm -r ${analysisDir}

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation {
owner = "rescript-lang";
repo = "rescript-vscode";
rev = version;
sha256 = "sha256-+Ht8qWwxtFWHFMiV/aoZIs2S3SxkOWgdwSKN+akp/LU=";
hash = "sha256-+Ht8qWwxtFWHFMiV/aoZIs2S3SxkOWgdwSKN+akp/LU=";
};
nativeBuildInputs = [ ocaml dune_3 ocamlPackages.cppo ];

View File

@ -10,7 +10,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
name = "context-mapper-vscode-extension";
publisher = "contextmapper";
version = "6.11.0";
sha256 = "sha256-TvApcBBI+Egu7t4tJuEYTs6mhvABOY2eXVb57O4gWfs=";
hash = "sha256-TvApcBBI+Egu7t4tJuEYTs6mhvABOY2eXVb57O4gWfs=";
};
nativeBuildInputs = [

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
name = "vsc-material-theme";
publisher = "Equinusocio";
version = "34.3.1";
sha256 = "sha256-3yxFTMtjJR1b4EzBDfm55HF9chrya5OUF5wN+KHEduE=";
hash = "sha256-3yxFTMtjJR1b4EzBDfm55HF9chrya5OUF5wN+KHEduE=";
};
# extensions wants to write at the /nix/store path, so we patch it to use the globalStorageUri instead.

View File

@ -4,7 +4,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
name = "terraform";
publisher = "hashicorp";
version = "2.19.0";
sha256 = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY=";
hash = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY=";
};
patches = [ ./fix-terraform-ls.patch ];

View File

@ -5,7 +5,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
name = "plantuml";
publisher = "jebbs";
version = "2.17.4";
sha256 = "sha256-fnz6ubB73i7rJcv+paYyNV1r4cReuyFPjgPM0HO40ug=";
hash = "sha256-fnz6ubB73i7rJcv+paYyNV1r4cReuyFPjgPM0HO40ug=";
};
nativeBuildInputs = [ jq moreutils ];
postInstall = ''

View File

@ -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";

View File

@ -12,7 +12,7 @@ let
extInfo = {
x86_64-linux = {
arch = "linux-x64";
sha256 = "sha256-7m85Zl9oV40le3nkNPzoKu/AAf8XhQpI8sBMsQXmBg8=";
hash = "sha256-7m85Zl9oV40le3nkNPzoKu/AAf8XhQpI8sBMsQXmBg8=";
binaries = [
"components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/servicehub-controller-net60.linux-x64/Microsoft.ServiceHub.Controller"
"components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/visualstudio-code-servicehost.linux-x64/Microsoft.VisualStudio.Code.ServiceHost"
@ -22,7 +22,7 @@ let
};
aarch64-linux = {
arch = "linux-arm64";
sha256 = "sha256-39D55EdwE4baDYbHc9GD/1XoxGbQkUkS1H2uysJHlxw=";
hash = "sha256-39D55EdwE4baDYbHc9GD/1XoxGbQkUkS1H2uysJHlxw=";
binaries = [
"components/vs-green-server/platforms/linux-arm64/node_modules/@microsoft/servicehub-controller-net60.linux-arm64/Microsoft.ServiceHub.Controller"
"components/vs-green-server/platforms/linux-arm64/node_modules/@microsoft/visualstudio-code-servicehost.linux-arm64/Microsoft.VisualStudio.Code.ServiceHost"
@ -32,7 +32,7 @@ let
};
x86_64-darwin = {
arch = "darwin-x64";
sha256 = "sha256-gfhJX07R+DIw9FbzaEE0JZwEmDeifiq4vHyMHZZ1udM=";
hash = "sha256-gfhJX07R+DIw9FbzaEE0JZwEmDeifiq4vHyMHZZ1udM=";
binaries = [
"components/vs-green-server/platforms/darwin-x64/node_modules/@microsoft/servicehub-controller-net60.darwin-x64/Microsoft.ServiceHub.Controller"
"components/vs-green-server/platforms/darwin-x64/node_modules/@microsoft/visualstudio-code-servicehost.darwin-x64/Microsoft.VisualStudio.Code.ServiceHost"
@ -42,7 +42,7 @@ let
};
aarch64-darwin = {
arch = "darwin-arm64";
sha256 = "sha256-vogstgCWvI9csNF9JfJ41XPR1POy842g2yhWqIDoHLw=";
hash = "sha256-vogstgCWvI9csNF9JfJ41XPR1POy842g2yhWqIDoHLw=";
binaries = [
"components/vs-green-server/platforms/darwin-arm64/node_modules/@microsoft/servicehub-controller-net60.darwin-arm64/Microsoft.ServiceHub.Controller"
"components/vs-green-server/platforms/darwin-arm64/node_modules/@microsoft/visualstudio-code-servicehost.darwin-arm64/Microsoft.VisualStudio.Code.ServiceHost"
@ -57,7 +57,7 @@ buildVscodeMarketplaceExtension {
name = "csdevkit";
publisher = "ms-dotnettools";
version = "1.4.28";
inherit (extInfo) sha256 arch;
inherit (extInfo) hash arch;
};
sourceRoot = "extension"; # This has more than one folder.

View File

@ -29,22 +29,22 @@ let
{
x86_64-linux = {
arch = "linux-x64";
sha256 = "sha256-si4HKGVIHu44QNlNI2WEnMff9+QZOMWiBfWQaaFGyQE=";
hash = "sha256-si4HKGVIHu44QNlNI2WEnMff9+QZOMWiBfWQaaFGyQE=";
binaries = linuxBins;
};
aarch64-linux = {
arch = "linux-arm64";
sha256 = "sha256-1IXkSRgCHOLD4VeCdqyy54MXCBUX5RDDb3pf7GQH5jA=";
hash = "sha256-1IXkSRgCHOLD4VeCdqyy54MXCBUX5RDDb3pf7GQH5jA=";
binaries = linuxBins;
};
x86_64-darwin = {
arch = "darwin-x64";
sha256 = "sha256-AAbYjZ+YYyGEXSLkiFfluLf7P4OzPhmHzK44N5XT9UI=";
hash = "sha256-AAbYjZ+YYyGEXSLkiFfluLf7P4OzPhmHzK44N5XT9UI=";
binaries = darwinBins;
};
aarch64-darwin = {
arch = "darwin-arm64";
sha256 = "sha256-1m47kX0Jo+UvthNfgdoPdBBOcDyCA8DfP+zRk3SicR0=";
hash = "sha256-1m47kX0Jo+UvthNfgdoPdBBOcDyCA8DfP+zRk3SicR0=";
binaries = darwinBins ++ [
".debugger/arm64/vsdbg-ui"
".debugger/arm64/vsdbg"
@ -57,7 +57,7 @@ buildVscodeMarketplaceExtension {
name = "csharp";
publisher = "ms-dotnettools";
version = "2.22.3";
inherit (extInfo) sha256 arch;
inherit (extInfo) hash arch;
};
nativeBuildInputs = [

View File

@ -21,7 +21,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
name = "python";
publisher = "ms-python";
version = "2023.1.10091012";
sha256 = "sha256-JosFv6ngJmw1XRILwTZMVxlGIdWFLFQjj4olfnVwAIM=";
hash = "sha256-JosFv6ngJmw1XRILwTZMVxlGIdWFLFQjj4olfnVwAIM=";
};
buildInputs = [ icu ];
@ -72,7 +72,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
tmp=$(mktemp)
curl -sLo $tmp $(echo ${(import ../mktplcExtRefToFetchArgs.nix mktplcRef).url} | sed "s|${mktplcRef.version}|$version|")
hash=$(nix hash file --type sha256 --base32 --sri $tmp)
sed -i -e "s|${mktplcRef.sha256}|$hash|" -e "s|${mktplcRef.version}|$version|" pkgs/applications/editors/vscode/extensions/python/default.nix
sed -i -e "s|${mktplcRef.hash}|$hash|" -e "s|${mktplcRef.version}|$version|" pkgs/applications/editors/vscode/extensions/python/default.nix
fi
'';

View File

@ -5,7 +5,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
name = "jupyter";
publisher = "ms-toolsai";
version = "2024.2.0";
sha256 = "sha256-QavZ8NNeu0FHLvorhHybzfmdQqKnyXD6MYA8AzabPQw=";
hash = "sha256-QavZ8NNeu0FHLvorhHybzfmdQqKnyXD6MYA8AzabPQw=";
};
nativeBuildInputs = [

View File

@ -84,7 +84,7 @@ buildVscodeMarketplaceExtension {
name = "remote-ssh";
publisher = "ms-vscode-remote";
version = "0.78.0";
sha256 = "sha256-vd+9d86Z8429QpQVCZm8gtiJDcMpD++aiFVwvCrPg5w=";
hash = "sha256-vd+9d86Z8429QpQVCZm8gtiJDcMpD++aiFVwvCrPg5w=";
};
postPatch = ''

View File

@ -32,11 +32,11 @@ let
gdbDefaultsTo = if gdbUseFixed then "${gdb}/bin/gdb" else "gdb";
supported = {
x86_64-linux = {
sha256 = "sha256-4mKCBqUCOndKEfsJqTIsfwEt+0CZI8QAhBj3Y4+wKlg=";
hash = "sha256-4mKCBqUCOndKEfsJqTIsfwEt+0CZI8QAhBj3Y4+wKlg=";
arch = "linux-x64";
};
aarch64-linux = {
sha256 = "sha256-Kjl8mEpayA1xMHEAMJ5k3Ctk3l48KlUBU5w3dL4pGWM=";
hash = "sha256-Kjl8mEpayA1xMHEAMJ5k3Ctk3l48KlUBU5w3dL4pGWM=";
arch = "linux-arm64";
};
};

View File

@ -31,7 +31,7 @@ in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtens
name = "vsliveshare";
publisher = "ms-vsliveshare";
version = "1.0.5900";
sha256 = "sha256-syVW/aS2ppJjg4OZaenzGM3lczt+sLy7prwsYFTDl9s=";
hash = "sha256-syVW/aS2ppJjg4OZaenzGM3lczt+sLy7prwsYFTDl9s=";
};
}).overrideAttrs({ buildInputs ? [], ... }: {
buildInputs = buildInputs ++ libs;

View File

@ -26,7 +26,7 @@ let
owner = "rust-lang";
repo = "rust-analyzer";
rev = releaseTag;
sha256 = "sha256-Oj/RPMridKpYt3eRqUIPg9YNrj6npG8THIGuWjsamnE=";
hash = "sha256-Oj/RPMridKpYt3eRqUIPg9YNrj6npG8THIGuWjsamnE=";
};
build-deps = nodePackages."rust-analyzer-build-deps-../../applications/editors/vscode/extensions/rust-lang.rust-analyzer/build-deps";

View File

@ -8,7 +8,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
name = "lua";
publisher = "sumneko";
version = "3.7.3";
sha256 = "sha256-JsZrCeT843QvQkebyOVlO9MI2xbEQI8xX0DrPacfGrM=";
hash = "sha256-JsZrCeT843QvQkebyOVlO9MI2xbEQI8xX0DrPacfGrM=";
};
# Running chmod in runtime will lock up extension

View File

@ -6,7 +6,7 @@ let
repo = "llvm-project";
# codelldb/14.x branch
rev = "4c267c83cbb55fedf2e0b89644dc1db320fdfde7";
sha256 = "sha256-jM//ej6AxnRYj+8BAn4QrxHPT6HiDzK5RqHPSg3dCcw=";
hash = "sha256-jM//ej6AxnRYj+8BAn4QrxHPT6HiDzK5RqHPSg3dCcw=";
};
in (llvmPackages.lldb.overrideAttrs (oldAttrs: rec {
passthru = (oldAttrs.passthru or {}) // {

View File

@ -74,6 +74,7 @@ let
"publisher"
"version"
"sha256"
"hash"
"arch"
];