1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

nix: Enable pure mode by default

We want to encourage a brave new world of hermetic evaluation for
source-level reproducibility, so flakes should not poke around in the
filesystem outside of their explicit dependencies.

Note that the default installation source remains impure in that it
can refer to mutable flakes, so "nix build nixpkgs.hello" still works
(and fetches the latest nixpkgs, unless it has been pinned by the
user).

A problem with pure evaluation is that builtins.currentSystem is
unavailable. For the moment, I've hard-coded "x86_64-linux" in the
nixpkgs flake. Eventually, "system" should be a flake function
argument.
This commit is contained in:
Eelco Dolstra 2019-02-12 20:35:03 +01:00
parent 91a6a47b0e
commit ba05f29838
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
6 changed files with 38 additions and 30 deletions

View file

@ -318,6 +318,8 @@ public:
const FlakeRegistry & getFlakeRegistry();
Value * makeFlakeRegistryValue();
private:
std::unique_ptr<FlakeRegistry> _flakeRegistry;
std::once_flag _flakeRegistryInit;