nixcfg/overlays/unstable/claude-code/package.nix
Harald Hoyer 05284e86c5 chore: bump claude-code to version 1.0.38
- Updated `@anthropic-ai/claude-code` dependency from 1.0.35 to 1.0.38.
- Adjusted hashes in `package-lock.json` and `package.nix` to reflect the new version.
- Ensured consistency with the updated package configuration.
2025-07-01 09:38:29 +02:00

49 lines
1.3 KiB
Nix

{
lib,
buildNpmPackage,
fetchzip,
nodejs_20,
}:
buildNpmPackage rec {
pname = "claude-code";
version = "1.0.38";
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-flG9VlnQfMfGFBbs6RdQKSbceD/Tke19Euo8znR5OG0=";
};
npmDepsHash = "sha256-IOk/dPi43WqFb1mWC/48JMK5a8PeSHE2uKz+4qA3AYA=";
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";
};
}