nixcfg/overlays/unstable/claude-code/package.nix
Harald Hoyer 31ea97a5af chore(claude-code): bump version to 1.0.80
- Updated `claude-code` version from 1.0.69 to 1.0.80 in `package.nix`.
- Adjusted hash values for `src` and `npmDepsHash` to match the new version.
- Removed redundant `--unset DEV` flag from the wrapper script.
2025-08-14 12:58:39 +02:00

49 lines
1.3 KiB
Nix

{
lib,
buildNpmPackage,
fetchzip,
nodejs_20,
}:
buildNpmPackage rec {
pname = "claude-code";
version = "1.0.80";
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-o7fG0LnTR7fGxq4VP5393tcQZi0JtPOF8Gb2cUAsevA=";
};
npmDepsHash = "sha256-9eVpQfcdiLyL6LWcBuVrd6XHQC5caZS9m8sNy9kaRyQ=";
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 = "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 = with lib.maintainers; [
malo
omarjatoi
];
mainProgram = "claude";
};
}