ci(nix): let Renovate bump the pinned tools and fix the hashes - #53
Open
Joibel wants to merge 1 commit into
Open
ci(nix): let Renovate bump the pinned tools and fix the hashes#53Joibel wants to merge 1 commit into
Joibel wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on PR #46
Chain of upstream PRs as of 2026-07-30
PR build(nix): one tools-only flake at the repo root #46:
nix-stack-base←tb-ufbi.1-pr1tb-ufbi.1-pr1←tb-ufbi.8-pr8Fixes #TODO
Motivation
Modifications
Verification
Documentation
AI
🤖 Generated with Claude Code
https://claude.ai/code/session_01H871PuNyYPzjmpUhXCRXGA