2004-06-28 14:07:07 +02:00
|
|
|
storeExpr=$($TOP/src/nix-instantiate/nix-instantiate fallback.nix)
|
2004-06-24 16:35:01 +02:00
|
|
|
echo "store expr is $storeExpr"
|
|
|
|
|
2005-01-25 14:00:12 +01:00
|
|
|
outPath=$($TOP/src/nix-store/nix-store -q --fallback "$storeExpr")
|
|
|
|
echo "output path is $outPath"
|
2004-06-24 16:35:01 +02:00
|
|
|
|
2005-01-25 14:00:12 +01:00
|
|
|
# Register a non-existant substitute
|
2005-01-25 18:24:14 +01:00
|
|
|
(echo $outPath && echo $TOP/no-such-program && echo 0 && echo 0) | $TOP/src/nix-store/nix-store --substitute
|
2004-06-24 16:35:01 +02:00
|
|
|
|
2005-01-25 14:00:12 +01:00
|
|
|
# Build the derivation
|
|
|
|
$TOP/src/nix-store/nix-store -r --fallback "$storeExpr"
|
2004-06-24 16:35:01 +02:00
|
|
|
|
|
|
|
text=$(cat "$outPath"/hello)
|
|
|
|
if test "$text" != "Hello World!"; then exit 1; fi
|