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