Open
Description
Is your feature request related to a problem? Please describe.
- For RFC 92 dynamic derivations we want to add derivations to the store from within the sandbox. While writing a derivation text to a predefined location such as
$out
would get the job done for a single derivation, the real power comes from adding multiple derivations. After all, if you're going to produce only one derivation, you might as well "inline" the work - not that useful. - When running nix inside the nix sandbox, users have to perform a lot of nontrivial setup just to get instantiation to work (EDIT: this is also Make Nix configure itself better when it runs in the sandbox #8698, but I haven't removed this aspect from the issue because there's a strong interaction)
Describe the solution you'd like
- A very restricted recursive nix socket in the sandbox, supporting
addToStore
and little else, if anything - An environment variable that's set in the sandbox configures nix with a default store that behaves correctly
If both solutions apply in all derivations, that would significantly improve the user experience for testing.
Describe alternatives you've considered
Without considering RFC 92, we could view as a goal: easier setup of a separate store in the sandbox. In other words, we could make this setup easier.
Additional context
- This was blocked by such a broken test setup flake: update nixpkgs: 22.11 -> 23.05 #8569 (or build with nixos-unstable channel #8590)
- Complicated test setup linked earlier
- Tracking issue for RFC 92: Dynamic derivations #6316
Priorities
Add 👍 to issues you find important.
Activity