Support specifying --store and --eval-store - #682
Open
ShamrockLee wants to merge 4 commits into
Open
Conversation
Reviews always built into the ambient /nix/store. This is a prerequisite for isolating experimental builds (e.g. ca-derivations, which has known store-corruption bugs) from the user's main store. --store is passed through to every store-touching nix call and is a no-op when unset. The review shell warns but still attempts to launch with a custom store, since built binaries won't be at the real /nix/store path. Assisted-by: claude-code: claude-opus-4.8, claude-sonnet-4.6
Remote/slow build stores (e.g. nixbuild.net) recommend keeping evaluation on a local store while builds go elsewhere. --store alone couldn't express that split. --eval-store is passed through wherever evaluation happens (eval, instantiate, nix build's own eval, the review shell); pure store queries (verify, log) are unaffected since they don't evaluate. Assisted-by: claude-code: claude-opus-4.8, claude-sonnet-4.6
The test called build_config_from_args() directly. That shells out to a real `nix eval` for current_system(), with no environment isolation, unlike tests that use the helpers.nixpkgs() fixture. This passed in an interactive dev shell. It failed in a Nix build sandbox: no writable profile dir, so `nix eval` itself errors out. The test only cares about --store/--eval-store threading. Mock current_system() instead of depending on ambient Nix state. Assisted-by: claude-code: claude-opus-4.8, claude-sonnet-4.6
list_packages()'s nix-env call computed base-vs-merged output paths without --store/--eval-store. Harmless without --allow ifd, but with IFD enabled it could build into the real /nix/store despite an isolated --store being set. Assisted-by: claude-code: claude-opus-4.8, claude-sonnet-4.6
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.
Allow
nixpkgs-reviewto run in an alternative Nix store.Note:
I'm also adding support to specify custom Nix configuration via a Nix-like
--optionflag as a parallel effort in a local feature branch.Since there's no
--optionalternative for--eval-store(aside from--option store <alternative store>), standalone--storeand--eval-storeflags would still help.Assisted-by: claude-code: claude-opus-4.8, claude-sonnet-4.6