From ae5cdc92466cb6ca39bfa8aa6aa5f7f1a34a5895 Mon Sep 17 00:00:00 2001 From: oenu <51684443+oenu@users.noreply.github.com> Date: Tue, 17 Feb 2026 12:59:22 -0500 Subject: [PATCH] vscode: 1.109.2 -> 1.109.4 --- .../editors/vscode/update-vscode.sh | 31 +++++++++++++++++-- pkgs/applications/editors/vscode/vscode.nix | 16 +++++----- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/editors/vscode/update-vscode.sh b/pkgs/applications/editors/vscode/update-vscode.sh index bb1562c0f3ce..c092ae92c86f 100755 --- a/pkgs/applications/editors/vscode/update-vscode.sh +++ b/pkgs/applications/editors/vscode/update-vscode.sh @@ -1,14 +1,33 @@ #! /usr/bin/env nix-shell #!nix-shell -i bash -p bash curl gawk gnugrep gnused jq nix nix-prefetch nix-prefetch-scripts common-updater-scripts +# Script to automatically fetch latest vscode + set -eou pipefail -latestVersion=$(curl --fail --silent https://api.github.com/repos/Microsoft/vscode/releases | jq --raw-output 'map(select(.prerelease==false)) | .[].tag_name' | sort -V | tail -n1) +version="${1:-}" + currentVersion=$(nix eval --raw -f . vscode.version) -echo "latest version: $latestVersion" +if [[ -n "$version" ]]; then + latestVersion="$version" +else + latestVersion=$(curl --fail --silent https://api.github.com/repos/Microsoft/vscode/releases | jq --raw-output 'map(select(.prerelease==false)) | .[].tag_name' | sort -V | tail -n1) + if ! [[ "$latestVersion" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Error: Invalid version from GitHub API: $latestVersion" + exit 1 + fi +fi + +echo "target version: $latestVersion" echo "current version: $currentVersion" +minVersion=$(printf '%s\n' "$currentVersion" "$latestVersion" | sort -V | head -n1) +if [[ "$minVersion" == "$latestVersion" ]] && [[ "$latestVersion" != "$currentVersion" ]]; then + echo "Error: target version '$latestVersion' is less than current version '$currentVersion'" + exit 1 +fi + if [[ "$latestVersion" == "$currentVersion" ]]; then echo "package is up-to-date" exit 0 @@ -23,4 +42,10 @@ for system in $systems; do done rev=$(curl --fail --silent https://api.github.com/repos/Microsoft/vscode/git/ref/tags/$latestVersion | jq --raw-output .object.sha) -update-source-version vscode $rev --version-key=rev --source-key=vscodeServer.src --ignore-same-version --ignore-same-hash +vscodeServerHash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url https://update.code.visualstudio.com/commit:$rev/server-linux-x64/stable)) +update-source-version vscode $rev $vscodeServerHash --version-key=rev --source-key=vscodeServer.src --ignore-same-version --ignore-same-hash + +echo "" +echo "Update complete! To test the changes:" +echo " 1. Close any running VS Code instances" +echo " 2. Run: NIXPKGS_ALLOW_UNFREE=1 nix run -f . vscode" diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index 2284c514a303..58666db8fea9 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -36,20 +36,20 @@ let hash = { - x86_64-linux = "sha256-ST5i8gvNtAaBbmcpcg9GJipr8e5d0A0qbdG1P9QViek="; - x86_64-darwin = "sha256-BRGXLasiHZSKsijq02bCa2RbaBc7iC1ZtLe29u4KTH0="; - aarch64-linux = "sha256-7plpHWoi8eYDKQZVV3OCXZJUk8j173M1xpRgTOTsPZ0="; - aarch64-darwin = "sha256-RgfhGjVFmaIAAotTYNPUDrJZ8qj8e4yR9bVfal/Hl6o="; - armv7l-linux = "sha256-Zzz4HsmiWcKiBRE19pGll8BRQy26wbmpuYSi89PDoBo="; + x86_64-linux = "sha256-6zmuYl34QMG3W5h/gCfiW9atK4CpdoQJvttw6y4sy9Q="; + x86_64-darwin = "sha256-0TD+ez+/jc6nZEoZO3j467ouMbmnek6iQQ6SMo57oL0="; + aarch64-linux = "sha256-Cz7mjcm0HcoRK5EA5xi9AHOxbiEOt9JL+Drfd6/tYBw="; + aarch64-darwin = "sha256-8Rfjr8WShCwrJlJapkALNPubPVBpKGZRtHKtTi5Xslc="; + armv7l-linux = "sha256-eUvAvFIP8/5KIIyZFD6VY6RBR97kus6PFb7Inxgh30A="; } .${system} or throwSystem; # Please backport all compatible updates to the stable release. # This is important for the extension ecosystem. - version = "1.109.2"; + version = "1.109.4"; # This is used for VS Code - Remote SSH test - rev = "591199df409fbf59b4b52d5ad4ee0470152a9b31"; + rev = "c3a26841a84f20dfe0850d0a5a9bd01da4f003ea"; in buildVscode { pname = "vscode" + lib.optionalString isInsiders "-insiders"; @@ -82,7 +82,7 @@ buildVscode { src = fetchurl { name = "vscode-server-${rev}.tar.gz"; url = "https://update.code.visualstudio.com/commit:${rev}/server-linux-x64/stable"; - hash = "sha256-CbU8VdJETTzpwCpzVgavoeSQMdz3RdwDYJ7wUqs8LJ8="; + hash = "sha256-tv7BPcSnejWzURVB3/HpiyqjjeDxsn4dS/NTonsuEs4="; }; stdenv = stdenvNoCC; };