aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-11-25 17:20:58 +0100
committerGitHub <noreply@github.com>2021-11-25 17:20:58 +0100
commitd5d06212503e69aa7cfb701eb8e74fd927c85f56 (patch)
tree562a50c66b90bc09745e876fb150698df7769b2d
parent6f46434f3226784e809158a04a8067036f9e6291 (diff)
parent286eb81143908a49e96fa800e01b302d8f4b7370 (diff)
Merge pull request #5603 from obsidiansystems/recursive-nix-system-feature
"recursive-nix" system feature only with experimental feature
-rw-r--r--src/libstore/globals.cc2
-rw-r--r--src/libstore/store-api.cc5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 9f1a88130..81ca9cc0f 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -122,7 +122,7 @@ StringSet Settings::getDefaultSystemFeatures()
/* For backwards compatibility, accept some "features" that are
used in Nixpkgs to route builds to certain machines but don't
actually require anything special on the machines. */
- StringSet features{"nixos-test", "benchmark", "big-parallel", "recursive-nix"};
+ StringSet features{"nixos-test", "benchmark", "big-parallel"};
#if __linux__
if (access("/dev/kvm", R_OK | W_OK) == 0)
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index c88dfe179..71350906e 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -355,8 +355,13 @@ ValidPathInfo Store::addToStoreSlow(std::string_view name, const Path & srcPath,
StringSet StoreConfig::getDefaultSystemFeatures()
{
auto res = settings.systemFeatures.get();
+
if (settings.isExperimentalFeatureEnabled(Xp::CaDerivations))
res.insert("ca-derivations");
+
+ if (settings.isExperimentalFeatureEnabled(Xp::RecursiveNix))
+ res.insert("recursive-nix");
+
return res;
}