diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-03-25 14:04:18 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-03-25 14:04:18 +0100 |
commit | 86b05ccd54f2e98ac2b5cef3bcecb29ed6ec4fd8 (patch) | |
tree | 1bfdc7d899ca7fd8adde25fc30202d3cdb2f8d20 /src/nix/main.cc | |
parent | 55bc52401966fbffa525c574c14f67b00bc4fb3a (diff) |
Only provide builtin.{getFlake,fetchClosure} is the corresponding experimental feature is enabled
This allows writing fallback code like
if builtins ? fetchClosure then
builtins.fetchClose { ... }
else
builtins.storePath ...
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r-- | src/nix/main.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc index 9bc6c15fa..6198681e7 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -289,6 +289,7 @@ void mainWrapped(int argc, char * * argv) } if (argc == 2 && std::string(argv[1]) == "__dump-builtins") { + settings.experimentalFeatures = {Xp::Flakes, Xp::FetchClosure}; evalSettings.pureEval = false; EvalState state({}, openStore("dummy://")); auto res = nlohmann::json::object(); |