aboutsummaryrefslogtreecommitdiff
path: root/tests/build-hook.sh
blob: 402ed83c96cd44068935f794bfe3c85017681f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export NIX_BUILD_HOOK="build-hook.hook.sh"

storeExpr=$($TOP/src/nix-instantiate/nix-instantiate build-hook.nix)

echo "store expr is $storeExpr"

outPath=$($TOP/src/nix-store/nix-store -quf "$storeExpr")

echo "output path is $outPath"

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