NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.27k stars 1.48k forks source link

Add `target-store` and `eval-store` settings #10145

Open thufschmitt opened 7 months ago

thufschmitt commented 7 months ago

Is your feature request related to a problem? Please describe.

Confusion around --store like in https://github.com/NixOS/nix/issues/10119

Describe the solution you'd like

Cleanly separate the build and evaluation stores in the interface. For that

Describe alternatives you've considered

Additional context

In the longer run, we'll also want to split build-store (or build-stores) out of target-store, which would solve https://github.com/NixOS/nix/issues/6893 and give Nix the same model as Hydra.

Priorities

Add :+1: to issues you find important.

nixos-discourse commented 7 months ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-03-04-nix-team-meeting-minute-130/40830/1

roberth commented 6 months ago

I think I prefer destination or output instead of target, because build and target sounds like we're doing cross compilation.

What happens to the result symlink?

thufschmitt commented 6 months ago

Yup' destination is better, indeed (and more coherent with the rest of Nix)

What happens to the result symlink?

If the target store isn't a LocalFSStore, it isn't created (already the case on master)

roberth commented 6 months ago

output would imply that we don't copy the build dependencies there. It'd be equivalent to doing a build anywhere and copying only the outputs to the --output-store store.

For destination it wouldn't be as unexpected for the paths there to be a mix of actual final outputs and outputs of dependencies that were used during the build (which may not be dependencies of the requested outputs).