Loading pkgs/applications/editors/vscode/update-vscodium.sh +20 −34 Original line number Diff line number Diff line #!/usr/bin/env nix-shell #! nix-shell update-shell.nix -i bash # Update script for the vscode versions and hashes. # Usually doesn't need to be called by hand, # but is called by a bot: https://github.com/samuela/nixpkgs-upkeep/actions # Call it by hand if the bot fails to automatically update the versions. #!nix-shell -i bash -p bash nix curl coreutils jq common-updater-scripts set -eou pipefail ROOT="$(dirname "$(readlink -f "$0")")" if [ ! -f "$ROOT/vscodium.nix" ]; then echo "ERROR: cannot find vscodium.nix in $ROOT" exit 1 fi update_vscodium () { VSCODIUM_VER=$1 ARCH=$2 ARCH_LONG=$3 ARCHIVE_FMT=$4 VSCODIUM_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-${ARCH}-${VSCODIUM_VER}.${ARCHIVE_FMT}" VSCODIUM_SHA256=$(nix-prefetch-url ${VSCODIUM_URL}) sed -i "s/${ARCH_LONG} = \"[0-9a-zA-Z]\{40,64\}\"/${ARCH_LONG} = \"${VSCODIUM_SHA256}\"/" "$ROOT/vscodium.nix" } # VSCodium latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/VSCodium/vscodium/releases/latest | jq -r ".tag_name") currentVersion=$(nix-instantiate --eval -E "with import ./. {}; vscodium.version or (lib.getVersion vscodium)" | tr -d '"') VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}') sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix" echo "latest version: $latestVersion" echo "current version: $currentVersion" update_vscodium $VSCODIUM_VER linux-x64 x86_64-linux tar.gz update_vscodium $VSCODIUM_VER darwin-x64 x86_64-darwin zip update_vscodium $VSCODIUM_VER linux-arm64 aarch64-linux tar.gz update_vscodium $VSCODIUM_VER darwin-arm64 aarch64-darwin zip if [[ "$latestVersion" == "$currentVersion" ]]; then echo "package is up-to-date" exit 0 fi update_vscodium $VSCODIUM_VER linux-armhf armv7l-linux tar.gz for i in \ "x86_64-linux linux-x64 tar.gz" \ "aarch64-linux linux-arm64 tar.gz" \ "armv7l-linux linux-armhf tar.gz" \ "aarch64-darwin darwin-arm64 zip" \ "x86_64-darwin darwin-x64 zip"; do set -- $i hash=$(nix hash convert --hash-algo sha256 --to sri $(nix-prefetch-url "https://github.com/VSCodium/vscodium/releases/download/$latestVersion/VSCodium-$2-$latestVersion.$3")) update-source-version vscodium $latestVersion $hash --system=$1 --ignore-same-version done pkgs/applications/editors/vscode/vscodium.nix +12 −12 Original line number Diff line number Diff line Loading @@ -24,13 +24,13 @@ let archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz"; sha256 = hash = { x86_64-linux = "14x7f1i5w8q40mbyc77nfw0kgccgfpzp3jg1r77lj307b8vlh0ma"; x86_64-darwin = "1ma207pyhkn66hyswjhqpsm5n2180n5mclhw21ikd9jg4n63nwqs"; aarch64-linux = "1qhx99s8n28lfs5fjl924qx04za4jqs7n286qz0izm9lhcdbdbid"; aarch64-darwin = "1dm4l6crm79i16f3bs6m5v5icxsgzbwcmp4c66wcpnvzyqfqwz64"; armv7l-linux = "1fp5bw8qkkzi9d9ifkfchidkgrad1kjl7hkwpgy5sdgvi49sbw8l"; x86_64-linux = "sha256-HzNK7/Y5PrFYNYtlfBqqq3ECRDbQVK83Xq7WnG1WYYI="; x86_64-darwin = "sha256-w+nUsvlo/rsslw6Mn3npPaCwYW42YZ3Ku5QhXYhaHJ8="; aarch64-linux = "sha256-0l1i76yPfn/kaj8vvsQ8Pzx77Bxqjm5ZCYMsB6gYrcU="; aarch64-darwin = "sha256-yDXacWuhhMxfJn6KI51zThet6FUYY7pKfznpeZYg9fw="; armv7l-linux = "sha256-F1ox+G1fMoLoAcBoydizWjkudg17j8JnQ63RzeWwi6o="; } .${system} or throwSystem; Loading @@ -41,7 +41,7 @@ callPackage ./generic.nix rec { # Please backport all compatible updates to the stable release. # This is important for the extension ecosystem. version = "1.97.2.25045"; version = "1.98.0.25067"; pname = "vscodium"; executableName = "codium"; Loading @@ -50,7 +50,7 @@ callPackage ./generic.nix rec { src = fetchurl { url = "https://github.com/VSCodium/vscodium/releases/download/${version}/VSCodium-${plat}-${version}.${archive_fmt}"; inherit sha256; inherit hash; }; tests = nixosTests.vscodium; Loading @@ -62,7 +62,7 @@ callPackage ./generic.nix rec { # See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information. dontFixup = stdenv.hostPlatform.isDarwin; meta = with lib; { meta = { description = '' Open source source code editor developed by Microsoft for Windows, Linux and macOS (VS Code without MS branding/telemetry/licensing) Loading @@ -76,9 +76,9 @@ callPackage ./generic.nix rec { ''; homepage = "https://github.com/VSCodium/vscodium"; downloadPage = "https://github.com/VSCodium/vscodium/releases"; license = licenses.mit; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; maintainers = with maintainers; [ license = lib.licenses.mit; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; maintainers = with lib.maintainers; [ synthetica bobby285271 ludovicopiero Loading Loading
pkgs/applications/editors/vscode/update-vscodium.sh +20 −34 Original line number Diff line number Diff line #!/usr/bin/env nix-shell #! nix-shell update-shell.nix -i bash # Update script for the vscode versions and hashes. # Usually doesn't need to be called by hand, # but is called by a bot: https://github.com/samuela/nixpkgs-upkeep/actions # Call it by hand if the bot fails to automatically update the versions. #!nix-shell -i bash -p bash nix curl coreutils jq common-updater-scripts set -eou pipefail ROOT="$(dirname "$(readlink -f "$0")")" if [ ! -f "$ROOT/vscodium.nix" ]; then echo "ERROR: cannot find vscodium.nix in $ROOT" exit 1 fi update_vscodium () { VSCODIUM_VER=$1 ARCH=$2 ARCH_LONG=$3 ARCHIVE_FMT=$4 VSCODIUM_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-${ARCH}-${VSCODIUM_VER}.${ARCHIVE_FMT}" VSCODIUM_SHA256=$(nix-prefetch-url ${VSCODIUM_URL}) sed -i "s/${ARCH_LONG} = \"[0-9a-zA-Z]\{40,64\}\"/${ARCH_LONG} = \"${VSCODIUM_SHA256}\"/" "$ROOT/vscodium.nix" } # VSCodium latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/VSCodium/vscodium/releases/latest | jq -r ".tag_name") currentVersion=$(nix-instantiate --eval -E "with import ./. {}; vscodium.version or (lib.getVersion vscodium)" | tr -d '"') VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}') sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix" echo "latest version: $latestVersion" echo "current version: $currentVersion" update_vscodium $VSCODIUM_VER linux-x64 x86_64-linux tar.gz update_vscodium $VSCODIUM_VER darwin-x64 x86_64-darwin zip update_vscodium $VSCODIUM_VER linux-arm64 aarch64-linux tar.gz update_vscodium $VSCODIUM_VER darwin-arm64 aarch64-darwin zip if [[ "$latestVersion" == "$currentVersion" ]]; then echo "package is up-to-date" exit 0 fi update_vscodium $VSCODIUM_VER linux-armhf armv7l-linux tar.gz for i in \ "x86_64-linux linux-x64 tar.gz" \ "aarch64-linux linux-arm64 tar.gz" \ "armv7l-linux linux-armhf tar.gz" \ "aarch64-darwin darwin-arm64 zip" \ "x86_64-darwin darwin-x64 zip"; do set -- $i hash=$(nix hash convert --hash-algo sha256 --to sri $(nix-prefetch-url "https://github.com/VSCodium/vscodium/releases/download/$latestVersion/VSCodium-$2-$latestVersion.$3")) update-source-version vscodium $latestVersion $hash --system=$1 --ignore-same-version done
pkgs/applications/editors/vscode/vscodium.nix +12 −12 Original line number Diff line number Diff line Loading @@ -24,13 +24,13 @@ let archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz"; sha256 = hash = { x86_64-linux = "14x7f1i5w8q40mbyc77nfw0kgccgfpzp3jg1r77lj307b8vlh0ma"; x86_64-darwin = "1ma207pyhkn66hyswjhqpsm5n2180n5mclhw21ikd9jg4n63nwqs"; aarch64-linux = "1qhx99s8n28lfs5fjl924qx04za4jqs7n286qz0izm9lhcdbdbid"; aarch64-darwin = "1dm4l6crm79i16f3bs6m5v5icxsgzbwcmp4c66wcpnvzyqfqwz64"; armv7l-linux = "1fp5bw8qkkzi9d9ifkfchidkgrad1kjl7hkwpgy5sdgvi49sbw8l"; x86_64-linux = "sha256-HzNK7/Y5PrFYNYtlfBqqq3ECRDbQVK83Xq7WnG1WYYI="; x86_64-darwin = "sha256-w+nUsvlo/rsslw6Mn3npPaCwYW42YZ3Ku5QhXYhaHJ8="; aarch64-linux = "sha256-0l1i76yPfn/kaj8vvsQ8Pzx77Bxqjm5ZCYMsB6gYrcU="; aarch64-darwin = "sha256-yDXacWuhhMxfJn6KI51zThet6FUYY7pKfznpeZYg9fw="; armv7l-linux = "sha256-F1ox+G1fMoLoAcBoydizWjkudg17j8JnQ63RzeWwi6o="; } .${system} or throwSystem; Loading @@ -41,7 +41,7 @@ callPackage ./generic.nix rec { # Please backport all compatible updates to the stable release. # This is important for the extension ecosystem. version = "1.97.2.25045"; version = "1.98.0.25067"; pname = "vscodium"; executableName = "codium"; Loading @@ -50,7 +50,7 @@ callPackage ./generic.nix rec { src = fetchurl { url = "https://github.com/VSCodium/vscodium/releases/download/${version}/VSCodium-${plat}-${version}.${archive_fmt}"; inherit sha256; inherit hash; }; tests = nixosTests.vscodium; Loading @@ -62,7 +62,7 @@ callPackage ./generic.nix rec { # See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information. dontFixup = stdenv.hostPlatform.isDarwin; meta = with lib; { meta = { description = '' Open source source code editor developed by Microsoft for Windows, Linux and macOS (VS Code without MS branding/telemetry/licensing) Loading @@ -76,9 +76,9 @@ callPackage ./generic.nix rec { ''; homepage = "https://github.com/VSCodium/vscodium"; downloadPage = "https://github.com/VSCodium/vscodium/releases"; license = licenses.mit; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; maintainers = with maintainers; [ license = lib.licenses.mit; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; maintainers = with lib.maintainers; [ synthetica bobby285271 ludovicopiero Loading