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