chore: bump claude-code to version 1.0.11

- Updated `@anthropic-ai/claude-code` dependency from 1.0.3 to 1.0.11.
- Adjusted hashes in `package-lock.json` and `package.nix` for the new version.
- Added support for additional sharp optional dependencies.
This commit is contained in:
Harald Hoyer 2025-06-05 09:52:50 +02:00
parent f464e19fec
commit ca4ee05900
2 changed files with 93 additions and 13 deletions

View file

@ -1,19 +1,22 @@
{ lib
, buildNpmPackage
, fetchzip
,
{
lib,
buildNpmPackage,
fetchzip,
nodejs_20,
}:
buildNpmPackage rec {
pname = "claude-code";
version = "1.0.3";
version = "1.0.11";
nodejs = nodejs_20; # required for sandboxed Nix builds on Darwin
src = fetchzip {
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${version}.tgz";
hash = "sha256-LjDxVv6KSTuRZhCHztvf81E5DQbkqs8cbrnbbGkCeQU=";
hash = "sha256-IXNBNjt4Sh5pR+Cz2uEZcCop9reAmQ7hObohtN0f3Ww=";
};
npmDepsHash = "sha256-muMukVEj6uXkupSoyp41FihsLth0ENgfzBlD5CwlE2w=";
npmDepsHash = "sha256-p5FQBBlMNcRBYKIkeeETyup5zKr2Rcxu/Jw+kFwQrHA=";
postPatch = ''
cp ${./package-lock.json} package-lock.json
@ -27,8 +30,7 @@ buildNpmPackage rec {
# https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#environment-variables
postInstall = ''
wrapProgram $out/bin/claude \
--set DISABLE_AUTOUPDATER 1 \
--set NODE_OPTIONS "--max_old_space_size=8192"
--set DISABLE_AUTOUPDATER 1
'';
passthru.updateScript = ./update.sh;