Skip to content

Make sure settings.sandboxedPaths is closed outside DerivationBuilder#13801

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:move-sandbox-path-closure-code
Aug 20, 2025
Merged

Make sure settings.sandboxedPaths is closed outside DerivationBuilder#13801
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:move-sandbox-path-closure-code

Conversation

@Ericson2314
Copy link
Member

Motivation

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.)

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

, inputPaths{inputPaths}
, initialOutputs{initialOutputs}
, buildMode{buildMode}
, defaultPathsInChroot{defaultPathsInChroot}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::move?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point will do

…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.)
@Ericson2314 Ericson2314 force-pushed the move-sandbox-path-closure-code branch from 3676935 to 4c76db8 Compare August 20, 2025 22:49
Copy link
Contributor

@xokdvium xokdvium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Ericson2314
Copy link
Member Author

but we can always factor it out later.

Yup, that is on my agenda!

@Ericson2314 Ericson2314 enabled auto-merge August 20, 2025 23:07
@Ericson2314 Ericson2314 merged commit e2b9847 into NixOS:master Aug 20, 2025
14 checks passed
@Ericson2314 Ericson2314 deleted the move-sandbox-path-closure-code branch August 20, 2025 23:15
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.

2 participants