vscode-extensions.ms-dotnettools.csharp: 2.72.34 -> 2.76.27 (#407244)

This commit is contained in:
Pol Dellaiera
2025-05-15 06:50:58 +00:00
committed by GitHub
2 changed files with 5 additions and 53 deletions
@@ -17,19 +17,19 @@ let
{
x86_64-linux = {
arch = "linux-x64";
hash = "sha256-pMcUrsIVpb0lYhonEKB/5pZG+08OhL/Py7wmkmlXWgo=";
hash = "sha256-yJ4bAxIg3yfQJPWJcl6jUMwQ/ssHkstJWuEp3wr0dDA=";
};
aarch64-linux = {
arch = "linux-arm64";
hash = "sha256-dJilgYVLkx5JVHk3e3mZjW7qpWrviuB4OhtzV1DkmrI=";
hash = "sha256-EpWHwansBwBD0aYoW2ek7iWFbp+s7ZH6ug3ejoSRG5U=";
};
x86_64-darwin = {
arch = "darwin-x64";
hash = "sha256-DyueVd+G67P48Oo0+HTC3Sg0/en/bRBV+F8mKuz66RY=";
hash = "sha256-345hK47tyMGMJDKiujwpECDHMbRpLi17x2lH2rMX9Lg=";
};
aarch64-darwin = {
arch = "darwin-arm64";
hash = "sha256-yk6bSeaEivx8kc3fqpSJBTMxUDsJGVwMoRxPPwaHgtc=";
hash = "sha256-u/vflQd285SuZ41ASd8nJgs+lN6892J3x6lPgWqVY+Y=";
};
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")
@@ -39,7 +39,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "csharp";
publisher = "ms-dotnettools";
version = "2.72.34";
version = "2.76.27";
inherit (extInfo) hash arch;
};
@@ -134,8 +134,6 @@ vscode-utils.buildVscodeMarketplaceExtension {
)
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Official C# support for Visual Studio Code";
homepage = "https://github.com/dotnet/vscode-csharp";
@@ -1,46 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq nix common-updater-scripts
# shellcheck shell=bash
set -euo pipefail
export LC_ALL=C
PUBLISHER=ms-dotnettools
EXTENSION=csharp
response=$(curl -s 'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery' \
-H 'accept: application/json;api-version=3.0-preview.1' \
-H 'content-type: application/json' \
--data-raw '{"filters":[{"criteria":[{"filterType":7,"value":"'"$PUBLISHER.$EXTENSION"'"}]}],"flags":16}')
# Find the latest version compatible with stable vscode version
latest_version=$(jq --raw-output '
.results[0].extensions[0].versions
| map(select(has("properties")))
| map(select(.properties | map(select(.key == "Microsoft.VisualStudio.Code.Engine")) | .[0].value | test("\\^[0-9.]+$")))
| map(select(.properties | map(select(.key == "Microsoft.VisualStudio.Code.PreRelease")) | .[0].value != "true"))
| .[0].version' <<<"$response")
getDownloadUrl() {
nix-instantiate \
--eval \
--strict \
--json \
'pkgs/applications/editors/vscode/extensions/mktplcExtRefToFetchArgs.nix' \
--attr url \
--argstr publisher $PUBLISHER \
--argstr name $EXTENSION \
--argstr version "$latest_version" \
--argstr arch "$1" | jq . --raw-output
}
update_hash() {
local hash
hash=$(nix hash convert --hash-algo sha256 "$(nix-prefetch-url --type sha256 "$(getDownloadUrl "$2")")")
update-source-version vscode-extensions.$PUBLISHER.$EXTENSION "$latest_version" "$hash" --system="$1" --ignore-same-version
}
update_hash x86_64-linux linux-x64
update_hash aarch64-linux linux-arm64
update_hash x86_64-darwin darwin-x64
update_hash aarch64-darwin darwin-arm64