about summary refs log blame commit diff
path: root/tests/build-hook.sh
blob: 402ed83c96cd44068935f794bfe3c85017681f48 (plain) (tree)
1
2
3
4
5
6
7
                                          




                                                                    
                                                         




                                            
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