mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
* Fix the tests.
This commit is contained in:
parent
3757ee589f
commit
550ba9ebb4
12 changed files with 67 additions and 63 deletions
|
@ -1,15 +1,19 @@
|
|||
source common.sh
|
||||
|
||||
drvPath=$($nixinstantiate fallback.nix)
|
||||
clearStore
|
||||
|
||||
drvPath=$($nixinstantiate simple.nix)
|
||||
echo "derivation is $drvPath"
|
||||
|
||||
outPath=$($nixstore -q --fallback "$drvPath")
|
||||
echo "output path is $outPath"
|
||||
|
||||
# Register a non-existant substitute
|
||||
(echo $outPath && echo "" && echo $TOP/no-such-program && echo 0 && echo 0) | $nixstore --register-substitutes
|
||||
# Build with a substitute that fails. This should fail.
|
||||
export NIX_SUBSTITUTERS=$(pwd)/substituter2.sh
|
||||
if $nixstore -r "$drvPath"; then echo unexpected fallback; exit 1; fi
|
||||
|
||||
# Build the derivation
|
||||
# Build with a substitute that fails. This should fall back to a source build.
|
||||
export NIX_SUBSTITUTERS=$(pwd)/substituter2.sh
|
||||
$nixstore -r --fallback "$drvPath"
|
||||
|
||||
text=$(cat "$outPath"/hello)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue