Skip to content

chore(nix): follow quest's nixpkgs so dev shells share one C compiler - #312

Merged
kixelated merged 1 commit into
mainfrom
nix/follow-quest-nixpkgs
Nov 27, 2026
Merged

kixelated merged 1 commit into
mainfrom
nix/follow-quest-nixpkgs

Conversation

@kixelated

@kixelated kixelated commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Each repository's dev shell takes its C compiler from its own nixpkgs pin. mbx keys every linked action, such as a build script or proc-macro, by that compiler's store path, so those crates and every crate built on them miss the shared cache between repositories whose pins give different compilers. On 2026-11-27 the org's dev shells gave three different x86_64-linux stdenv.cc paths.

This repository's compiler already matched quest's; following quest keeps it matched as the pins move: any nixpkgs move that rebuilds stdenv changes the compiler's store path.

Approach

  • nixpkgs.follows = "quest/nixpkgs", and quest no longer follows ours. Every repository locks quest at the release moq-bot bumps it to, so one release gives every dev shell one compiler.
  • The lock keeps quest where it was and takes quest's own nixpkgs, 5d2b81a7a3 (2026-11-14); it was 680275f0bb (2026-11-20).

Impact

  • No public API or wire change.
  • nixpkgs now moves with each quest bump; nix flake update nixpkgs no longer moves it.

Alternatives

  • Asking mbx to key a linker by its version and crt digests rather than its store path: declined.
  • Leaving each repository's cache entries apart.

Follow-ups

None.

Validation

  • nix eval of every dev shell's stdenv.cc on x86_64-linux, aarch64-linux, and aarch64-darwin gives quest v0.28.1's nixpkgs' compiler.
  • nix build of devShells.x86_64-linux.default substitutes everything but the shell itself.
  • Measured on one host (isolated mbx cache, moq-relay's cargo check, rustc 1.98.1 in both shells): replaying the build in a shell on another pin's compiler hit 242 of 353 compilations (81 misses); on the same compiler it hit all 353.

Models

  • Size: M
  • Implementer: Claude Code, claude-opus-5-5, high

🤖 Generated with Claude Code

(Written by Claude Opus 5.5 with high)

Review

Rewritten by quest review after each round.

  • Head: 1857ad0

  • Base: origin/main at b3fe055

  • Risk: medium, the base has no RISK.md to name what is always high or customer-facing, so every change is medium

  • Classified: medium by default

  • Risk file: none

  • Reviewer: Codex, gpt-6.2-sol, high effort

  • Session: 01a21dc7-6a0a-7882-aae0-677884446559, round 1

  • Score: 10/10, Quest owns the nixpkgs pin, the root nixpkgs alias still resolves for deployment, and the new pin supplies Bun 1.4.4 as required by package.json.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

mbx keys build scripts, proc-macros, and every crate built on them by the
C compiler's store path, so repositories whose nixpkgs pins give different
compilers share none of them. Taking nixpkgs from quest, whose release every
repository locks, gives every dev shell the same one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The flake now uses the nixpkgs input selected by quest. The quest input now follows the top-level flake-utils input.

Merge Risk: Minimal · up to 1857a · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Nix flake now follows quest's nixpkgs so the dev shells share one C compiler. It uses the conventional chore(nix) prefix and is specific enough for a reviewer scan…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is specific and related to the changeset. It explains that flake.nix now makes nixpkgs follow quest/nixpkgs, so the compiler matches quest's. It gives the rationale (mbx cache keyed by…
Full details: Title check

Explanation

The title names the main change: the Nix flake now follows quest's nixpkgs so the dev shells share one C compiler. It uses the conventional chore(nix) prefix and is specific enough for a reviewer scanning history.

Full details: Description check

Explanation

The description is specific and related to the changeset. It explains that flake.nix now makes nixpkgs follow quest/nixpkgs, so the compiler matches quest's. It gives the rationale (mbx cache keyed by compiler store path), the lock change (5d2b81a7a3 replacing 680275f0bb), the impact on nixpkgs updates, and validation steps.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6306519e-f50a-4267-88d2-eebf7f05ac9d
Commits

Reviewing files that changed from the base of the PR and between b3fe055 and 1857ad0.

Files ignored due to path filters: 1

  • flake.lock is excluded by !**/*.lock
Files selected for processing: 1

  • flake.nix

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@kixelated
kixelated merged commit 77d39e4 into main Nov 27, 2026
4 checks passed
@kixelated
kixelated deleted the nix/follow-quest-nixpkgs branch November 27, 2026 16:39
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