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"
|
|
|
|
|
2004-06-25 17:36:09 +02:00
|
|
|
# Register a non-existant successor (and a nox-existant substitute).
|
2004-06-24 16:35:01 +02:00
|
|
|
suc=$NIX_STORE_DIR/deadbeafdeadbeafdeadbeafdeadbeaf-s.store
|
2004-12-20 15:38:04 +01:00
|
|
|
(echo $suc && echo $TOP/no-such-program && echo 0) | $TOP/src/nix-store/nix-store --substitute
|
2004-06-24 16:35:01 +02:00
|
|
|
$TOP/src/nix-store/nix-store --successor $storeExpr $suc
|
|
|
|
|
2004-06-28 12:42:57 +02:00
|
|
|
outPath=$($TOP/src/nix-store/nix-store -qnf --fallback "$storeExpr")
|
2004-06-24 16:35:01 +02:00
|
|
|
|
|
|
|
echo "output path is $outPath"
|
|
|
|
|
|
|
|
text=$(cat "$outPath"/hello)
|
|
|
|
if test "$text" != "Hello World!"; then exit 1; fi
|