- Add Nix package for @anthropic-ai/claude-code (v2.1.59) - Add package-lock.json with optional dependencies for all platforms - Include update script for automated version updates - Add module integration with custom package reference - Rename claude shell alias to claude-custom Refs: https://github.com/anthropics/claude-code
claude-code
Nix package for @anthropic-ai/claude-code.
Updating
- Fetch the tarball and generate a
package-lock.json:
mkdir /tmp/claude-update && cd /tmp/claude-update
npm pack @anthropic-ai/claude-code@<version>
tar -xf anthropic-ai-claude-code-<version>.tgz
cd package
npm install --package-lock-only --ignore-scripts
- Copy the lockfile into the package directory:
cp package-lock.json /path/to/nixpkgs/pkgs/by-name/cl/claude-code/package-lock.json
-
Update the
versionandhashfields inpackage.nix. Sethashtolib.fakeHashtemporarily, then build to get the correct hash: -
Do the same for
npmDepsHash: