Make sure settings.sandboxedPaths is closed outside DerivationBuilder#13801
Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom Aug 20, 2025
Merged
Conversation
xokdvium
reviewed
Aug 20, 2025
| , inputPaths{inputPaths} | ||
| , initialOutputs{initialOutputs} | ||
| , buildMode{buildMode} | ||
| , defaultPathsInChroot{defaultPathsInChroot} |
…der` This is a nicer separation of concerns --- `DerivationBuilder` just mounts the extra paths you tell it too, and the outside world is responsible for making sure those extra paths make sense. Since the closure only depends on global settings, and not per-derivation information, we also have the option of moving this up further and caching it across all local builds. (I only just realized this after having done this refactor. I am not doing that change at this time, however.)
3676935 to
4c76db8
Compare
xokdvium
approved these changes
Aug 20, 2025
Contributor
xokdvium
left a comment
There was a problem hiding this comment.
SGTM. Not a huge fan that now it's the derivation building goal that has a bunch of miscellaneous code, but we can always factor it out later.
Member
Author
Yup, that is on my agenda! |
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.
Motivation
This is a nicer separation of concerns ---
DerivationBuilderjust mounts the extra paths you tell it too, and the outside world is responsible for making sure those extra paths make sense.Since the closure only depends on global settings, and not per-derivation information, we also have the option of moving this up further and caching it across all local builds. (I only just realized this after having done this refactor. I am not doing that change at this time, however.)
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.