2006-03-01 14:15:33 +02:00
|
|
|
source common.sh
|
|
|
|
|
2007-08-13 16:15:02 +03:00
|
|
|
clearStore
|
|
|
|
|
2004-06-24 15:56:24 +03:00
|
|
|
# Instantiate.
|
2007-08-13 16:15:02 +03:00
|
|
|
drvPath=$($nixinstantiate simple.nix)
|
2005-02-09 14:57:13 +02:00
|
|
|
echo "derivation is $drvPath"
|
2004-06-24 15:56:24 +03:00
|
|
|
|
|
|
|
# Find the output path.
|
2006-03-01 14:51:18 +02:00
|
|
|
outPath=$($nixstore -qvvvvv "$drvPath")
|
2004-06-24 15:56:24 +03:00
|
|
|
echo "output path is $outPath"
|
|
|
|
|
2007-08-13 16:15:02 +03:00
|
|
|
echo $outPath > $TEST_ROOT/sub-paths
|
2004-06-24 15:56:24 +03:00
|
|
|
|
2007-08-13 16:15:02 +03:00
|
|
|
# First try a substituter that fails, then one that succeeds
|
|
|
|
export NIX_SUBSTITUTERS=$(pwd)/substituter2.sh:$(pwd)/substituter.sh
|
2004-06-24 15:56:24 +03:00
|
|
|
|
2009-04-01 00:14:07 +03:00
|
|
|
$nixstore -j0 -rvv "$drvPath"
|
2004-06-24 15:56:24 +03:00
|
|
|
|
|
|
|
text=$(cat "$outPath"/hello)
|
2007-08-13 16:15:02 +03:00
|
|
|
if test "$text" != "Hallo Wereld"; then echo "wrong substitute output: $text"; exit 1; fi
|