2024-05-28 19:43:04 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-11-04 14:23:58 +02:00
|
|
|
source common.sh
|
|
|
|
|
2024-06-16 18:56:50 +03:00
|
|
|
TODO_NixOS # can't enable a sandbox feature easily
|
2024-06-16 13:51:46 +03:00
|
|
|
|
2023-04-20 03:36:33 +03:00
|
|
|
enableFeatures 'recursive-nix'
|
2021-09-13 15:29:42 +03:00
|
|
|
restartDaemon
|
|
|
|
|
2019-11-04 14:23:58 +02:00
|
|
|
clearStore
|
|
|
|
|
2020-06-25 19:26:34 +03:00
|
|
|
rm -f $TEST_ROOT/result
|
|
|
|
|
2020-07-24 21:38:56 +03:00
|
|
|
export unreachable=$(nix store add-path ./recursive.sh)
|
2019-11-04 14:23:58 +02:00
|
|
|
|
2023-04-20 02:36:05 +03:00
|
|
|
NIX_BIN_DIR=$(dirname $(type -p nix)) nix --extra-experimental-features 'nix-command recursive-nix' build -o $TEST_ROOT/result -L --impure --file ./recursive.nix
|
2019-11-04 14:23:58 +02:00
|
|
|
|
|
|
|
[[ $(cat $TEST_ROOT/result/inner1) =~ blaat ]]
|
|
|
|
|
|
|
|
# Make sure the recursively created paths are in the closure.
|
|
|
|
nix path-info -r $TEST_ROOT/result | grep foobar
|
|
|
|
nix path-info -r $TEST_ROOT/result | grep fnord
|
|
|
|
nix path-info -r $TEST_ROOT/result | grep inner1
|