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