2006-03-01 12:15:33 +00:00
|
|
|
source common.sh
|
|
|
|
|
2005-02-09 12:57:13 +00:00
|
|
|
drvPath=$($TOP/src/nix-instantiate/nix-instantiate fallback.nix)
|
|
|
|
echo "derivation is $drvPath"
|
2004-06-24 14:35:01 +00:00
|
|
|
|
2005-02-09 12:57:13 +00:00
|
|
|
outPath=$($TOP/src/nix-store/nix-store -q --fallback "$drvPath")
|
2005-01-25 13:00:12 +00:00
|
|
|
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
|
2005-04-08 13:48:41 +00:00
|
|
|
(echo $outPath && echo "" && echo $TOP/no-such-program && echo 0 && echo 0) | $TOP/src/nix-store/nix-store --register-substitutes
|
2004-06-24 14:35:01 +00:00
|
|
|
|
2005-01-25 13:00:12 +00:00
|
|
|
# Build the derivation
|
2005-02-09 12:57:13 +00:00
|
|
|
$TOP/src/nix-store/nix-store -r --fallback "$drvPath"
|
2004-06-24 14:35:01 +00:00
|
|
|
|
|
|
|
text=$(cat "$outPath"/hello)
|
|
|
|
if test "$text" != "Hello World!"; then exit 1; fi
|