feat: add package-lock.json for claude-code
Introduced a new `package-lock.json` for the `claude-code` project. This ensures consistent dependency management and locks all required versions for reproducible builds.
This commit is contained in:
parent
1d9f500d52
commit
a4d34ea7d1
4 changed files with 674 additions and 1 deletions
43
overlays/unstable/claude-code/package.nix
Normal file
43
overlays/unstable/claude-code/package.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib
|
||||
, buildNpmPackage
|
||||
, fetchzip
|
||||
,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "claude-code";
|
||||
version = "0.2.99";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${version}.tgz";
|
||||
hash = "sha256-MfzhISp36niovUMPU8vC+a3PTp53PpOHeGacH6nj/PY=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-pe2WSDovHvAsx4SYr+a/fTRrpYPya68S10mUWvv18M4=";
|
||||
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} package-lock.json
|
||||
'';
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
AUTHORIZED = "1";
|
||||
|
||||
# `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
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/claude \
|
||||
--set DISABLE_AUTOUPDATER 1
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
description = "An agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster";
|
||||
homepage = "https://github.com/anthropics/claude-code";
|
||||
downloadPage = "https://www.npmjs.com/package/@anthropic-ai/claude-code";
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = [ lib.maintainers.malo ];
|
||||
mainProgram = "claude";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue