You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
claude-code: manifest + updateScript, bump to 2.1.156 (#304)
Bumps Claude Code to 2.1.156 and replaces the hand-maintained
version/hash pin with the nixpkgs pattern: a generated `manifest.json`
read via `lib.importJSON` plus a `passthru.updateScript`.
## Why
The previous `default.nix` pinned the version and four per-platform SRI
hashes inline behind a 14-line comment describing a manual "re-prefetch
each platform binary" loop. Anthropic actually publishes a per-version
`manifest.json` on the GCS bucket (every platform's checksum in one
file) plus a `latest` pointer, so the four-prefetch dance was never
necessary. nixpkgs already consumes that manifest; this brings our
package in line.
## What changed
- `packages/claude-code/manifest.json` (generated): version + per-system
`{ slug, hash }`. SRI, not the hex upstream ships (repo ast-grep bans
`sha256 =` hex in fetchers).
- `packages/claude-code/default.nix`: reads the manifest, derives the
fetch URL/hash from it, and exposes `passthru.updateScript`. The
system→slug map now lives only in the updater (single owner);
`default.nix` reads the slug back from the manifest.
- `lib/packages.nix`: injects a pkgs-applied `writeNushellApplication`
into the flake package-set context so the updater can build. The overlay
context does not provide it, so `pkgs.claude-code` (consumed by the dev
image) simply omits `updateScript`; the flake output `.#claude-code`
carries it.
- `agents-md/sections/13-dependency-intake.md` (+ regenerated
`AGENTS.md`/`CLAUDE.md`): one durable note that prebuilt-binary packages
own a generated manifest + updateScript and are bumped by running the
updater.
## Bumping going forward
```sh
nix run .#claude-code.updateScript -- <version> # omit version to track `latest`
```
It refetches the upstream manifest, converts hex→SRI, and rewrites
`manifest.json`.
## Validation
- `nix build .#claude-code` builds 2.1.156 (hashes match).
- `nix run .#claude-code.updateScript -- 2.1.156` reproduces the
committed `manifest.json` byte-for-byte.
- Overlay eval: `pkgs.claude-code.version == "2.1.156"`, `? updateScript
== false` (no missing-arg error).
- `nix run .#lint` clean.
0 commit comments