Skip to content

Commit b0f4f98

Browse files
committed
Update claude code and reduce traffic
1 parent 6dfc596 commit b0f4f98

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

pkgs/claude-code/default.nix

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Use the following command to update the package
22
# ```sh
3-
# nix-shell maintainers/scripts/update.nix --argstr commit true --arg predicate '(path: pkg: builtins.elem path [["claude-code"] ["vscode-extensions" "anthropic" "claude-code"]])'
3+
# nix-shell maintainers/scripts/update.nix --argstr commit true --arg predicate '(path: pkg: builtins.elem path [["claude-code"] ["claude-code-bin"] ["vscode-extensions" "anthropic" "claude-code"]])'
44
# ```
55
{
66
lib,
@@ -15,24 +15,23 @@
1515
}:
1616
buildNpmPackage (finalAttrs: {
1717
pname = "claude-code";
18-
version = "2.1.9";
18+
version = "2.1.29";
1919

2020
src = fetchzip {
2121
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${finalAttrs.version}.tgz";
22-
hash = "sha256-TU+54QVtcFaUErv8YB0NxmgP+0eUqa2JEjAVRHKPICs=";
22+
hash = "sha256-bRXULCl5F87SWEcsD9S8ZaBrEK2QtK/GEhpEFR1CMWQ=";
2323
};
2424

25-
npmDepsHash = "sha256-yZ5hFIqdKh6VYPGtdIaUq7CW9mnCyeFflr02laU8K0A=";
25+
npmDepsHash = "sha256-lsW1xmHPvhD5j/bQcHssYhtykBzcgcaYdVkdlQ3GzWQ=";
2626

2727
strictDeps = true;
2828

2929
postPatch = ''
3030
cp ${./package-lock.json} package-lock.json
3131
32-
# Replace hardcoded `/bin/bash` with `/usr/bin/env bash` for Nix compatibility
3332
# https://github.com/anthropics/claude-code/issues/15195
3433
substituteInPlace cli.js \
35-
--replace-warn '#!/bin/bash' '#!/usr/bin/env bash'
34+
--replace-fail '#!/bin/sh' '#!/usr/bin/env sh'
3635
'';
3736

3837
dontNpmBuild = true;
@@ -45,6 +44,10 @@ buildNpmPackage (finalAttrs: {
4544
postInstall = ''
4645
wrapProgram $out/bin/claude \
4746
--set DISABLE_AUTOUPDATER 1 \
47+
--set DISABLE_INSTALLATION_CHECKS 1 \
48+
--set CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1 \
49+
--set CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 \
50+
--set IS_DEMO=1 \
4851
--unset DEV \
4952
--prefix PATH : ${
5053
lib.makeBinPath (

pkgs/claude-code/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)