1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-10 04:43:53 +02:00

* Fix the `--fallback' switch.

* Fix the substitutes tests.
This commit is contained in:
Eelco Dolstra 2005-01-25 13:00:12 +00:00
parent 581fc47783
commit c6290e42bc
10 changed files with 35 additions and 87 deletions

View file

@ -1,15 +1,14 @@
storeExpr=$($TOP/src/nix-instantiate/nix-instantiate fallback.nix)
echo "store expr is $storeExpr"
# Register a non-existant successor (and a nox-existant substitute).
suc=$NIX_STORE_DIR/deadbeafdeadbeafdeadbeafdeadbeaf-s.store
(echo $suc && echo $TOP/no-such-program && echo 0) | $TOP/src/nix-store/nix-store --substitute
$TOP/src/nix-store/nix-store --successor $storeExpr $suc
outPath=$($TOP/src/nix-store/nix-store -qnf --fallback "$storeExpr")
outPath=$($TOP/src/nix-store/nix-store -q --fallback "$storeExpr")
echo "output path is $outPath"
# Register a non-existant substitute
(echo $outPath && echo $TOP/no-such-program && echo 0) | $TOP/src/nix-store/nix-store --substitute
# Build the derivation
$TOP/src/nix-store/nix-store -r --fallback "$storeExpr"
text=$(cat "$outPath"/hello)
if test "$text" != "Hello World!"; then exit 1; fi