Skip to content

Commit 6db9767

Browse files
authored
claude-code: init at 0.2.9 (#384860)
2 parents f1a73a5 + 3ef3f3a commit 6db9767

File tree

3 files changed

+214
-0
lines changed

3 files changed

+214
-0
lines changed

pkgs/by-name/cl/claude-code/package-lock.json

Lines changed: 163 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
lib,
3+
buildNpmPackage,
4+
fetchzip,
5+
}:
6+
7+
buildNpmPackage rec {
8+
pname = "claude-code";
9+
version = "0.2.9";
10+
11+
src = fetchzip {
12+
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${version}.tgz";
13+
hash = "sha256-NB+pfpXrjTvvs4o81dsLhyOCvDBCF6ANkAgTnxCaF9Q=";
14+
};
15+
16+
npmDepsHash = "sha256-2v9wCcaOgA3RezX/pnqigsn6XhKcqP2adM2IGRhiHgc=";
17+
18+
postPatch = ''
19+
cp ${./package-lock.json} package-lock.json
20+
'';
21+
22+
dontNpmBuild = true;
23+
24+
AUTHORIZED = "1";
25+
26+
passthru.updateScript = ./update.sh;
27+
28+
meta = {
29+
description = "An agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster";
30+
homepage = "https://github.com/anthropics/claude-code";
31+
downloadPage = "https://www.npmjs.com/package/@anthropic-ai/claude-code";
32+
license = lib.licenses.unfree;
33+
maintainers = [ lib.maintainers.malo ];
34+
mainProgram = "claude";
35+
};
36+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i bash -p nodePackages.npm nix-update
3+
4+
set -euo pipefail
5+
6+
version=$(npm view @anthropic-ai/claude-code version)
7+
8+
# Generate updated lock file
9+
cd "$(dirname "${BASH_SOURCE[0]}")"
10+
npm i --package-lock-only @anthropic-ai/claude-code@"$version"
11+
rm -f package.json
12+
13+
# Update version and hashes
14+
cd -
15+
nix-update claude-code --version "$version"

0 commit comments

Comments
 (0)