1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 20:20:58 +01:00
nix/tests/substitutes2.sh
Wouter den Breejen ca3d96222a Merged R9207
2007-10-08 12:47:47 +00:00

21 lines
525 B
Bash

source common.sh
clearStore
# Instantiate.
drvPath=$($nixinstantiate simple.nix)
echo "derivation is $drvPath"
# Find the output path.
outPath=$($nixstore -qvvvvv "$drvPath")
echo "output path is $outPath"
echo $outPath > $TEST_ROOT/sub-paths
# First try a substituter that fails, then one that succeeds
export NIX_SUBSTITUTERS=$(pwd)/substituter2.sh:$(pwd)/substituter.sh
$nixstore -rvv "$drvPath"
text=$(cat "$outPath"/hello)
if test "$text" != "Hallo Wereld"; then echo "wrong substitute output: $text"; exit 1; fi