Skip to content

Commit d3be617

Browse files
authored
vscodium: 1.97.2.25045 -> 1.98.0.25067 (NixOS#388303)
2 parents 56ff4ea + 0c9ca77 commit d3be617

File tree

2 files changed

+32
-46
lines changed

2 files changed

+32
-46
lines changed
Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,26 @@
1-
#! /usr/bin/env nix-shell
2-
#! nix-shell update-shell.nix -i bash
3-
4-
# Update script for the vscode versions and hashes.
5-
# Usually doesn't need to be called by hand,
6-
# but is called by a bot: https://github.com/samuela/nixpkgs-upkeep/actions
7-
# Call it by hand if the bot fails to automatically update the versions.
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i bash -p bash nix curl coreutils jq common-updater-scripts
83

94
set -eou pipefail
105

11-
ROOT="$(dirname "$(readlink -f "$0")")"
12-
if [ ! -f "$ROOT/vscodium.nix" ]; then
13-
echo "ERROR: cannot find vscodium.nix in $ROOT"
14-
exit 1
15-
fi
16-
17-
update_vscodium () {
18-
VSCODIUM_VER=$1
19-
ARCH=$2
20-
ARCH_LONG=$3
21-
ARCHIVE_FMT=$4
22-
VSCODIUM_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-${ARCH}-${VSCODIUM_VER}.${ARCHIVE_FMT}"
23-
VSCODIUM_SHA256=$(nix-prefetch-url ${VSCODIUM_URL})
24-
sed -i "s/${ARCH_LONG} = \"[0-9a-zA-Z]\{40,64\}\"/${ARCH_LONG} = \"${VSCODIUM_SHA256}\"/" "$ROOT/vscodium.nix"
25-
}
26-
27-
# VSCodium
6+
latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/VSCodium/vscodium/releases/latest | jq -r ".tag_name")
7+
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; vscodium.version or (lib.getVersion vscodium)" | tr -d '"')
288

29-
VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}')
30-
sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix"
9+
echo "latest version: $latestVersion"
10+
echo "current version: $currentVersion"
3111

32-
update_vscodium $VSCODIUM_VER linux-x64 x86_64-linux tar.gz
33-
34-
update_vscodium $VSCODIUM_VER darwin-x64 x86_64-darwin zip
35-
36-
update_vscodium $VSCODIUM_VER linux-arm64 aarch64-linux tar.gz
37-
38-
update_vscodium $VSCODIUM_VER darwin-arm64 aarch64-darwin zip
12+
if [[ "$latestVersion" == "$currentVersion" ]]; then
13+
echo "package is up-to-date"
14+
exit 0
15+
fi
3916

40-
update_vscodium $VSCODIUM_VER linux-armhf armv7l-linux tar.gz
17+
for i in \
18+
"x86_64-linux linux-x64 tar.gz" \
19+
"aarch64-linux linux-arm64 tar.gz" \
20+
"armv7l-linux linux-armhf tar.gz" \
21+
"aarch64-darwin darwin-arm64 zip" \
22+
"x86_64-darwin darwin-x64 zip"; do
23+
set -- $i
24+
hash=$(nix hash convert --hash-algo sha256 --to sri $(nix-prefetch-url "https://github.com/VSCodium/vscodium/releases/download/$latestVersion/VSCodium-$2-$latestVersion.$3"))
25+
update-source-version vscodium $latestVersion $hash --system=$1 --ignore-same-version
26+
done

pkgs/applications/editors/vscode/vscodium.nix

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ let
2424

2525
archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz";
2626

27-
sha256 =
27+
hash =
2828
{
29-
x86_64-linux = "14x7f1i5w8q40mbyc77nfw0kgccgfpzp3jg1r77lj307b8vlh0ma";
30-
x86_64-darwin = "1ma207pyhkn66hyswjhqpsm5n2180n5mclhw21ikd9jg4n63nwqs";
31-
aarch64-linux = "1qhx99s8n28lfs5fjl924qx04za4jqs7n286qz0izm9lhcdbdbid";
32-
aarch64-darwin = "1dm4l6crm79i16f3bs6m5v5icxsgzbwcmp4c66wcpnvzyqfqwz64";
33-
armv7l-linux = "1fp5bw8qkkzi9d9ifkfchidkgrad1kjl7hkwpgy5sdgvi49sbw8l";
29+
x86_64-linux = "sha256-HzNK7/Y5PrFYNYtlfBqqq3ECRDbQVK83Xq7WnG1WYYI=";
30+
x86_64-darwin = "sha256-w+nUsvlo/rsslw6Mn3npPaCwYW42YZ3Ku5QhXYhaHJ8=";
31+
aarch64-linux = "sha256-0l1i76yPfn/kaj8vvsQ8Pzx77Bxqjm5ZCYMsB6gYrcU=";
32+
aarch64-darwin = "sha256-yDXacWuhhMxfJn6KI51zThet6FUYY7pKfznpeZYg9fw=";
33+
armv7l-linux = "sha256-F1ox+G1fMoLoAcBoydizWjkudg17j8JnQ63RzeWwi6o=";
3434
}
3535
.${system} or throwSystem;
3636

@@ -41,7 +41,7 @@ callPackage ./generic.nix rec {
4141

4242
# Please backport all compatible updates to the stable release.
4343
# This is important for the extension ecosystem.
44-
version = "1.97.2.25045";
44+
version = "1.98.0.25067";
4545
pname = "vscodium";
4646

4747
executableName = "codium";
@@ -50,7 +50,7 @@ callPackage ./generic.nix rec {
5050

5151
src = fetchurl {
5252
url = "https://github.com/VSCodium/vscodium/releases/download/${version}/VSCodium-${plat}-${version}.${archive_fmt}";
53-
inherit sha256;
53+
inherit hash;
5454
};
5555

5656
tests = nixosTests.vscodium;
@@ -62,7 +62,7 @@ callPackage ./generic.nix rec {
6262
# See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information.
6363
dontFixup = stdenv.hostPlatform.isDarwin;
6464

65-
meta = with lib; {
65+
meta = {
6666
description = ''
6767
Open source source code editor developed by Microsoft for Windows,
6868
Linux and macOS (VS Code without MS branding/telemetry/licensing)
@@ -76,9 +76,9 @@ callPackage ./generic.nix rec {
7676
'';
7777
homepage = "https://github.com/VSCodium/vscodium";
7878
downloadPage = "https://github.com/VSCodium/vscodium/releases";
79-
license = licenses.mit;
80-
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
81-
maintainers = with maintainers; [
79+
license = lib.licenses.mit;
80+
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
81+
maintainers = with lib.maintainers; [
8282
synthetica
8383
bobby285271
8484
ludovicopiero

0 commit comments

Comments
 (0)