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