1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
nix/tests/substitutes.sh

21 lines
438 B
Bash
Raw Normal View History

source common.sh
2007-08-13 09:15:02 -04:00
clearStore
# Instantiate.
2007-08-13 09:15:02 -04:00
drvPath=$($nixinstantiate simple.nix)
echo "derivation is $drvPath"
# Find the output path.
2006-03-01 07:51:18 -05:00
outPath=$($nixstore -qvv "$drvPath")
echo "output path is $outPath"
2007-08-13 09:15:02 -04:00
echo $outPath > $TEST_ROOT/sub-paths
2007-08-13 09:15:02 -04:00
export NIX_SUBSTITUTERS=$(pwd)/substituter.sh
2006-03-01 07:51:18 -05:00
$nixstore -rvv "$drvPath"
text=$(cat "$outPath"/hello)
2007-08-13 09:15:02 -04:00
if test "$text" != "Hallo Wereld"; then echo "wrong substitute output: $text"; exit 1; fi