chore(nix): FOD hash automation, current runner labels, self-prune decommission, darwin-legacy pin - #911
Open
levonk wants to merge 2 commits into
Open
chore(nix): FOD hash automation, current runner labels, self-prune decommission, darwin-legacy pin#911levonk wants to merge 2 commits into
levonk wants to merge 2 commits into
Conversation
The qmd-node-modules FOD (fixed-output derivation) uses per-platform hashes because bun.lock carries platform-gated optional dependencies (@esbuild/darwin-arm64, @esbuild/linux-x64, etc.) — a single outputHash cannot be shared across all four platforms. The x86_64-darwin and aarch64-linux hashes were left as pkgs.lib.fakeHash, causing `nix profile add github:tobi/qmd` to fail on Intel Macs and ARM Linux with hash mismatch errors. This commit: 1. Sets the correct x86_64-darwin FOD hash (computed locally on an Intel Mac), fixing `nix run`/`nix profile add` on darwin-x86. 2. Adds .github/workflows/nix-fod-hashes.yml — a 4-platform matrix CI workflow that computes each platform's FOD hash by building qmd-node-modules on a matching runner (ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest), then opens a PR with the updated hashes. This addresses Toby's request in PR tobi#55 ("can you add a workflow to update the hashes on release tags?") and implements the approach Mic92 suggested ("build matrix over the 4 architectures + collector job that updates the hashes file"). 3. Exposes qmd-node-modules as a package output so the CI workflow can build the FOD directly without building the full qmd derivation. 4. Adds macos-13 (x86_64-darwin) to the nix.yml CI matrix so the existing build CI covers Intel Macs alongside Apple Silicon and Linux. The aarch64-linux hash remains fakeHash — the first run of the nix-fod-hashes workflow will compute and populate it automatically.
…ission job Update nix.yml and nix-fod-hashes.yml to use the current GitHub Actions runner labels (macos-26, macos-26-intel) instead of the retired macos-13/macos-14. Migrate from cachix/install-nix-action to DeterminateSystems/nix-installer-action + magic-nix-cache-action for GitHub Actions cache support. Add a self-prune job to nix.yml that detects validate-x86-darwin failure and opens a PR to either update to a newer Intel runner label or comment out the dead job + swap x86_64-darwin FOD hashes to lib.fakeHash. This implements the auto-clean decommission handling from the nixify skill. Pin x86_64-darwin to nixpkgs-26.05-darwin (the last stable branch supporting x86_64-darwin, since nixpkgs-unstable dropped it in 26.11). Add bun.lock and package.json to the nix.yml path filter so dependency bumps trigger Nix CI.
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.
Summary
x86_64-darwinFOD hash (waspkgs.lib.fakeHash, now computed:sha256-B8YZsB+JRkG98nhZ71yrULSiOFBfbYJJVHcQ/SSf3yU=)nix-fod-hashes.ymlworkflow: 4-platform matrix buildsqmd-node-modulesFOD, collector job opens PR with updated hashes (addresses Toby's request in Nix fod build #55 and implements Mic92's suggested approach: "build matrix over the 4 architectures + collector job that updates the hashes file")nix.ymlto current GitHub Actions runner labels (macos-26,macos-26-intel) —macos-13is retiredcachix/install-nix-actiontoDeterminateSystems/nix-installer-action+magic-nix-cache-action(GitHub Actions cache, free, zero-config)self-prunejob tonix.yml: detectsvalidate-x86-darwinfailure and opens a PR to either update to a newer Intel runner label or comment out the dead job + swapx86_64-darwinFOD hashes tolib.fakeHash(auto-clean on runner decommission)x86_64-darwintonixpkgs-26.05-darwin(last stable branch supporting x86_64-darwin;nixpkgs-unstabledropped it in 26.11)bun.lockandpackage.jsontonix.ymlpath filter so dependency bumps trigger Nix CIFiles changed
flake.nix— addnixpkgs-darwin-legacyinput pinned tonixpkgs-26.05-darwin, use it forx86_64-darwin, fix x86_64-darwin FOD hash, exposeqmd-node-modulesas package output for CIflake.lock— updated for newnixpkgs-darwin-legacyinput.github/workflows/nix.yml— rewritten:macos-26/macos-26-intellabels, DeterminateSystems installer + magic-nix-cache,nix flake check --all-systems --no-build, separatevalidate-x86-darwinandvalidate-aarch64-darwinjobs,self-prunedecommission job,bun.lock/package.jsonpath filters.github/workflows/nix-fod-hashes.yml— new: 4-platform matrix (ubuntu-latest, ubuntu-24.04-arm, macos-26-intel, macos-26) computes FOD hashes, collector job updatesflake.nixand opens PRContext
Toby's comment on closed PR #55:
Mic92's follow-up:
This PR implements both requests. The
aarch64-linuxhash remainspkgs.lib.fakeHash— thenix-fod-hashesworkflow will compute it on first run (the ARM Ubuntu runner is needed for that).Test plan
nix build .#defaultsucceeds onx86_64-darwinwith the corrected hashnix run .#default -- --versionoutputsqmd 2.6.3nix flake check --all-systems --no-buildpasses (all 4 systems evaluate)actionlintvalidates both workflow YAML filesnix.yml— correctly matches thevalidate-x86-darwinjob blockflake.nix— correctly matches and replaces the x86_64-darwin SRI hashnix-fod-hashesworkflow computesaarch64-linuxhash on first run