feat(claude-code): update to version 2.0.1
- Updated `@anthropic-ai/claude-code` package to version 2.0.1. - Adjusted hashes in `package.nix` and `package-lock.json` for the new version. - Added `--unset DEV` flag in `postInstall` script to prevent crashes.
This commit is contained in:
parent
3e596d7ec1
commit
26628cbe12
2 changed files with 11 additions and 8 deletions
|
@ -7,16 +7,16 @@
|
|||
|
||||
buildNpmPackage rec {
|
||||
pname = "claude-code";
|
||||
version = "1.0.128";
|
||||
version = "2.0.1";
|
||||
|
||||
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-dzLGcCgje3FMMS+Ptmxd2JK08y7z9rI0ak5l3Bv1MUk=";
|
||||
hash = "sha256-LUbDPFa0lY74MBU4hvmYVntt6hVZy6UUZFN0iB4Eno8=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-Oba5Wx3HdrXaYKklm9LrKXVdvBeo05CgGy4zzo2B9T0=";
|
||||
npmDepsHash = "sha256-jpvy7b4A+E5iI7Y7kYnwH51BZAQGVXKaf3lQjI9e3OM=";
|
||||
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} package-lock.json
|
||||
|
@ -28,9 +28,11 @@ buildNpmPackage rec {
|
|||
|
||||
# `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 \
|
||||
--set DISABLE_AUTOUPDATER 1
|
||||
--set DISABLE_AUTOUPDATER 1 \
|
||||
--unset DEV
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
@ -42,6 +44,7 @@ buildNpmPackage rec {
|
|||
license = lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers; [
|
||||
malo
|
||||
markus1189
|
||||
omarjatoi
|
||||
];
|
||||
mainProgram = "claude";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue