mirror of
https://github.com/NixOS/nix.git
synced 2024-11-23 07:12:27 +00:00
13 lines
321 B
Bash
13 lines
321 B
Bash
|
export NIX_BUILD_HOOK="sh 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 -qnfvvvvv "$storeExpr")
|
||
|
|
||
|
echo "output path is $outPath"
|
||
|
|
||
|
text=$(cat "$outPath"/foobar)
|
||
|
if test "$text" != "BARBAR"; then exit 1; fi
|