aboutsummaryrefslogtreecommitdiff
path: root/tests/build-hook.sh
blob: 8cd9e8171fe1b575baaf98364c7f6ade6c34fec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
source common.sh

export NIX_BUILD_HOOK="build-hook.hook.sh"

drvPath=$($nixinstantiate build-hook.nix)

echo "derivation is $drvPath"

outPath=$($nixstore -quf "$drvPath")

echo "output path is $outPath"

text=$(cat "$outPath"/foobar)
if test "$text" != "BARBAR"; then exit 1; fi