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




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

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

echo "derivation is $drvPath"

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

echo "output path is $outPath"

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