2006-03-01 13:15:33 +01:00
|
|
|
source common.sh
|
|
|
|
|
2007-08-13 15:15:02 +02:00
|
|
|
clearStore
|
|
|
|
|
2004-06-20 21:17:54 +02:00
|
|
|
# Instantiate.
|
2007-08-13 15:15:02 +02:00
|
|
|
drvPath=$($nixinstantiate simple.nix)
|
2005-02-09 13:57:13 +01:00
|
|
|
echo "derivation is $drvPath"
|
2004-06-20 21:17:54 +02:00
|
|
|
|
|
|
|
# Find the output path.
|
2006-03-01 13:51:18 +01:00
|
|
|
outPath=$($nixstore -qvv "$drvPath")
|
2004-06-20 21:17:54 +02:00
|
|
|
echo "output path is $outPath"
|
|
|
|
|
2007-08-13 15:15:02 +02:00
|
|
|
echo $outPath > $TEST_ROOT/sub-paths
|
2004-06-20 21:17:54 +02:00
|
|
|
|
2007-08-13 15:15:02 +02:00
|
|
|
export NIX_SUBSTITUTERS=$(pwd)/substituter.sh
|
2004-06-20 21:17:54 +02:00
|
|
|
|
2010-11-17 15:39:02 +01:00
|
|
|
$nixstore -r "$drvPath" --dry-run 2>&1 | grep -q "1.00 MiB.*2.00 MiB"
|
|
|
|
|
2006-03-01 13:51:18 +01:00
|
|
|
$nixstore -rvv "$drvPath"
|
2004-06-20 21:17:54 +02:00
|
|
|
|
|
|
|
text=$(cat "$outPath"/hello)
|
2007-08-13 15:15:02 +02:00
|
|
|
if test "$text" != "Hallo Wereld"; then echo "wrong substitute output: $text"; exit 1; fi
|