aboutsummaryrefslogtreecommitdiff
path: root/tests/recursive.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-11-04 13:48:58 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-11-06 00:55:03 +0100
commitc119ab9db0edf65379593883c5ed5253549ebbd0 (patch)
treea0cd244d0f0a7b77cb99ab564c1985aa03e02a65 /tests/recursive.sh
parent2af9561316606892ce0337939c01f3c0d43d75bd (diff)
Enable recursive Nix using a feature
Derivations that want to use recursion should now set requiredSystemFeatures = [ "recursive-nix" ]; to make the daemon socket appear. Also, Nix should be configured with "experimental-features = recursive-nix".
Diffstat (limited to 'tests/recursive.sh')
-rw-r--r--tests/recursive.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/recursive.sh b/tests/recursive.sh
index 25204caf1..62896c015 100644
--- a/tests/recursive.sh
+++ b/tests/recursive.sh
@@ -4,7 +4,7 @@ clearStore
export unreachable=$(nix add-to-store ./recursive.sh)
-nix build -o $TEST_ROOT/result -L '(
+nix --experimental-features 'nix-command recursive-nix' build -o $TEST_ROOT/result -L '(
with import ./config.nix;
with import <nix/config.nix>;
mkDerivation {
@@ -15,6 +15,8 @@ nix build -o $TEST_ROOT/result -L '(
# Note: this is a string without context.
unreachable = builtins.getEnv "unreachable";
+ requiredSystemFeatures = [ "recursive-nix" ];
+
buildCommand = '\'\''
mkdir $out
PATH=${nixBinDir}:$PATH