diff options
Diffstat (limited to 'tests/functional/dyn-drv/recursive-mod-json.sh')
-rw-r--r-- | tests/functional/dyn-drv/recursive-mod-json.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/functional/dyn-drv/recursive-mod-json.sh b/tests/functional/dyn-drv/recursive-mod-json.sh new file mode 100644 index 000000000..0698b81bd --- /dev/null +++ b/tests/functional/dyn-drv/recursive-mod-json.sh @@ -0,0 +1,27 @@ +source common.sh + +# FIXME +if [[ $(uname) != Linux ]]; then skipTest "Not running Linux"; fi + +export NIX_TESTS_CA_BY_DEFAULT=1 + +enableFeatures 'recursive-nix' +restartDaemon + +clearStore + +rm -f $TEST_ROOT/result + +EXTRA_PATH=$(dirname $(type -p nix)):$(dirname $(type -p jq)) +export EXTRA_PATH + +# Will produce a drv +metaDrv=$(nix-instantiate ./recursive-mod-json.nix) + +# computed "dynamic" derivation +drv=$(nix-store -r $metaDrv) + +# build that dyn drv +res=$(nix-store -r $drv) + +grep 'I am alive!' $res/hello |