aboutsummaryrefslogtreecommitdiff
path: root/tests/substitutes2.sh
blob: 0bbc13913dac6c39d56814a57b08c060203eb4a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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