chore: claude-code update

This commit is contained in:
Harald Hoyer 2026-05-01 08:15:53 +02:00
parent 9deedfcb51
commit 14933e4e76
3 changed files with 100 additions and 45 deletions

View file

@ -1,47 +1,47 @@
{ {
"version": "2.1.119", "version": "2.1.126",
"commit": "6f68554839756189e277b8285a18fe47acd9a5a1", "commit": "e44c1d97bd39dbf2525164f3fd33be6edbf1661e",
"buildDate": "2026-04-23T20:45:14Z", "buildDate": "2026-04-30T16:08:06Z",
"platforms": { "platforms": {
"darwin-arm64": { "darwin-arm64": {
"binary": "claude", "binary": "claude",
"checksum": "31db3444309d5d0f8b85e8782e2dcd86f31f7e48c1a1e83d69b09268c7b4f9a2", "checksum": "87a1d05018ceadfc1fe616bfc10262b0503f51986f4af2dc42d1ed856ed3f7bb",
"size": 213404000 "size": 216260096
}, },
"darwin-x64": { "darwin-x64": {
"binary": "claude", "binary": "claude",
"checksum": "52b3b75cfe80c626982b2ffb3a6ce1c797824f257dc275cf0a3c32c202b6a3df", "checksum": "49a90c474383a9eda11310bd71f7ea6bb91361ec99443b733cb5003f6e703ccb",
"size": 214951760 "size": 217824336
}, },
"linux-arm64": { "linux-arm64": {
"binary": "claude", "binary": "claude",
"checksum": "382aa73ea4b07fd8d698e3159b5ef9e1b8739fae7505ba8ddd28b8a6a62819ce", "checksum": "88a6dca613a40559f3bac8a946a2ec6e60a870b91938d3df93dcac1dec4848cb",
"size": 245500480 "size": 248318528
}, },
"linux-x64": { "linux-x64": {
"binary": "claude", "binary": "claude",
"checksum": "cca43053f062949495596b11b6fd1b59cf79102adb13bacbe66997e6fae41e4a", "checksum": "fce96968d275161ff65a4c19fc6434efc6973d9f6d35dc3992a2ba0553cac18e",
"size": 245230208 "size": 248105600
}, },
"linux-arm64-musl": { "linux-arm64-musl": {
"binary": "claude", "binary": "claude",
"checksum": "e09bfaedd8bfdeaebe5f1cf9bb81ebeb718312c68fffce379fb51786263143d0", "checksum": "042bbc0c3610d005d371645e34c4b4055bb2499f7a4509ed667b2a8924ac5853",
"size": 238225856 "size": 241043840
}, },
"linux-x64-musl": { "linux-x64-musl": {
"binary": "claude", "binary": "claude",
"checksum": "ef41a11653b39c14db2d343f1f5e2a3af7eb9871c63e64deb6e65919670a4e0b", "checksum": "b3f39b00069558e57c6d36ead6b2efe013afa57b603445c338374d0c873e95c0",
"size": 239495616 "size": 242370944
}, },
"win32-x64": { "win32-x64": {
"binary": "claude.exe", "binary": "claude.exe",
"checksum": "e18c7dcfad4a3f5d33d202ec2dde630b648cf5b41622154d6210e793c7cceadc", "checksum": "1a6b4be4b45458ab1831bad138572bf2fec12cb1edea0685c5ff10ce6e97afb6",
"size": 254478496 "size": 254053024
}, },
"win32-arm64": { "win32-arm64": {
"binary": "claude.exe", "binary": "claude.exe",
"checksum": "9e0deb10c45108612484ce558fad378206d5ac23feb203067450e6c38d001241", "checksum": "7253defbc945f5461035240bc32d18970fb1acc5df63092c492ee8d7c7caf55f",
"size": 251203232 "size": 250115744
} }
} }
} }

View file

@ -1,36 +1,78 @@
# NOTE: Use the following command to update the package
# ```sh
# nix-shell maintainers/scripts/update.nix --argstr commit true --arg predicate '(path: pkg: builtins.elem path [["claude-code"] ["vscode-extensions" "anthropic" "claude-code"]])'
# ```
{ {
lib, lib,
buildNpmPackage, stdenvNoCC,
fetchzip, fetchurl,
writableTmpDirAsHomeHook, installShellFiles,
makeBinaryWrapper,
autoPatchelfHook,
procps,
ripgrep,
bubblewrap,
socat,
versionCheckHook, versionCheckHook,
writableTmpDirAsHomeHook,
}: }:
buildNpmPackage (finalAttrs: { let
stdenv = stdenvNoCC;
baseUrl = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases";
manifest = lib.importJSON ./manifest.json;
platformKey = "${stdenv.hostPlatform.node.platform}-${stdenv.hostPlatform.node.arch}";
platformManifestEntry = manifest.platforms.${platformKey};
in
stdenv.mkDerivation (finalAttrs: {
pname = "claude-code"; pname = "claude-code";
version = "2.1.126"; inherit (manifest) version;
src = fetchzip { src = fetchurl {
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${finalAttrs.version}.tgz"; url = "${baseUrl}/${finalAttrs.version}/${platformKey}/claude";
hash = "sha256-Il9MGrnnIV3i86cU3BjslGEdVodnV50VW3f2DEjSlMk="; sha256 = platformManifestEntry.checksum;
}; };
npmDepsHash = "sha256-tVQbjW2ZqzuH/MIpT8k5/OHBVLtuKPQt6P20TwBx3Cs="; dontUnpack = true;
dontBuild = true;
__noChroot = stdenv.hostPlatform.isDarwin;
# otherwise the bun runtime is executed instead of the binary
dontStrip = true;
postPatch = '' nativeBuildInputs = [
cp ${./package-lock.json} package-lock.json installShellFiles
''; makeBinaryWrapper
]
++ lib.optionals stdenv.hostPlatform.isElf [ autoPatchelfHook ];
dontNpmBuild = true; strictDeps = true;
env.AUTHORIZED = "1"; installPhase = ''
runHook preInstall
installBin $src
# `claude-code` tries to auto-update by default, this disables that functionality.
# https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#environment-variables
# The DEV=true env var causes claude to crash with `TypeError: window.WebSocket is not a constructor`
postInstall = ''
wrapProgram $out/bin/claude \ wrapProgram $out/bin/claude \
--set DISABLE_AUTOUPDATER 1 \ --set DISABLE_AUTOUPDATER 1 \
--unset DEV --set-default FORCE_AUTOUPDATE_PLUGINS 1 \
--set DISABLE_INSTALLATION_CHECKS 1 \
--set USE_BUILTIN_RIPGREP 0 \
--prefix PATH : ${
lib.makeBinPath (
[
# claude-code uses [node-tree-kill](https://github.com/pkrumins/node-tree-kill) which requires procps's pgrep(darwin) or ps(linux)
procps
# https://code.claude.com/docs/en/troubleshooting#search-and-discovery-issues
ripgrep
]
# the following packages are required for the sandbox to work (Linux only)
++ lib.optionals stdenv.hostPlatform.isLinux [
bubblewrap
socat
]
)
}
runHook postInstall
''; '';
doInstallCheck = true; doInstallCheck = true;
@ -46,12 +88,23 @@ buildNpmPackage (finalAttrs: {
meta = { meta = {
description = "Agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster"; description = "Agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster";
homepage = "https://github.com/anthropics/claude-code"; homepage = "https://github.com/anthropics/claude-code";
downloadPage = "https://www.npmjs.com/package/@anthropic-ai/claude-code"; downloadPage = "https://claude.com/product/claude-code";
changelog = "https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md";
license = lib.licenses.unfree; license = lib.licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
"aarch64-linux"
"x86_64-linux"
];
maintainers = with lib.maintainers; [ maintainers = with lib.maintainers; [
adeci
malo malo
markus1189 markus1189
mirkolenz
omarjatoi omarjatoi
oskarwires
xiaoxiangmoe xiaoxiangmoe
]; ];
mainProgram = "claude"; mainProgram = "claude";

View file

@ -1,10 +1,12 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix
#!nix-shell --pure --keep NIX_PATH -i bash --packages nodejs nix-update git cacert #!nix shell --ignore-environment .#cacert .#coreutils .#curl .#bash --command bash
set -euo pipefail set -euo pipefail
version=$(npm view @anthropic-ai/claude-code version) cd "$(dirname "${BASH_SOURCE[0]}")"
# Update version and hashes BASE_URL="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases"
AUTHORIZED=1 NIXPKGS_ALLOW_UNFREE=1 nix-update claude-code --version="$version" --generate-lockfile
nix-update vscode-extensions.anthropic.claude-code --use-update-script --version "$version" VERSION="${1:-$(curl -fsSL "$BASE_URL/latest")}"
curl -fsSL "$BASE_URL/$VERSION/manifest.json" --output manifest.json