Skip to content

ci(nix): let Renovate bump the pinned tools and fix the hashes - #53

Open
Joibel wants to merge 1 commit into
tb-ufbi.5-pr5from
tb-ufbi.8-pr8
Open

ci(nix): let Renovate bump the pinned tools and fix the hashes#53
Joibel wants to merge 1 commit into
tb-ufbi.5-pr5from
tb-ufbi.8-pr8

Conversation

@Joibel

@Joibel Joibel commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Based on PR #46

Chain of upstream PRs as of 2026-07-30

Fixes #TODO

Motivation

Modifications

Verification

Documentation

AI

🤖 Generated with Claude Code

https://claude.ai/code/session_01H871PuNyYPzjmpUhXCRXGA

@Joibel Joibel self-assigned this Jul 30, 2026
The flake pins sixteen tools by hand and nothing was watching them, so they
would drift the way the `go install` lines they replaced used to. Renovate can
watch them, but only halfway: it can edit a version string, and it has no idea
what the source tarball or the vendored module tree underneath that version
hashes to.

So split the job. A custom manager reads the `# renovate:` comments now sitting
above each entry in `toolVersions` and bumps the version; a workflow on
Renovate's branches then runs hack/nix/update-hashes.sh and commits the hashes
that go with it, before anyone reviews the PR. The script drives nix-update,
which refetches rather than builds — a fixed-output path is named after the hash
it is *expected* to have, so a stale download of the old version already sits
where the new one would go, and an ordinary build reuses it without a murmur.
That makes the script the answer for a bump by hand too, so running-locally.md
now says to run it rather than pasting hashes out of build errors.

Three pins are deliberately left alone and say so in place: cspell follows
nixpkgs, since the flake asserts on the version nixpkgs ships; the kube-openapi
commit is the one the checked-in OpenAPI definitions were generated from; and
OpenAPI Generator decides what the Java SDK downstream users compile against
looks like. k8s.io/code-generator is held to patch releases, because its minor
has to match the apimachinery in go.mod.

None of these automerge, unlike the rest of the patch updates on main: the point
of the pinned tier is that a version change gets read by someone, and the hashes
only arrive in a second commit. properdocs is grouped so its two homes — the
docs build and the nix shell — move together. The nixpkgs pin itself, which
moves every floating tool at once, is weekly and reviewed.

The workflow wants the GitHub App that used to push gomod2nix.toml, under
NIX_UPDATE_APP_ID and NIX_UPDATE_APP_PRIVATE_KEY. Without them it falls back to
GITHUB_TOKEN, which still pushes but leaves the PR's other checks unstarted.

Nothing needed deleting: no rule named the pin locations PR1 removed, and the
flakes it deleted under dev/nix and sdks/java were only ever matched by the
`nix` manager's default file pattern.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UfBK3mQcTNEBEGpXu4hzCY
Signed-off-by: Alan Clucas <alan@clucas.org>
@Joibel
Joibel changed the base branch from tb-ufbi.1-pr1 to tb-ufbi.5-pr5 July 31, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant