2004-05-13 19:14:49 +00:00
|
|
|
export NIX_BUILD_HOOK="build-hook.hook.sh"
|
2004-05-12 09:35:51 +00:00
|
|
|
|
2005-02-09 12:57:13 +00:00
|
|
|
drvPath=$($TOP/src/nix-instantiate/nix-instantiate build-hook.nix)
|
2004-05-12 09:35:51 +00:00
|
|
|
|
2005-02-09 12:57:13 +00:00
|
|
|
echo "derivation is $drvPath"
|
2004-05-12 09:35:51 +00:00
|
|
|
|
2005-02-09 12:57:13 +00:00
|
|
|
outPath=$($TOP/src/nix-store/nix-store -quf "$drvPath")
|
2004-05-12 09:35:51 +00:00
|
|
|
|
|
|
|
echo "output path is $outPath"
|
|
|
|
|
|
|
|
text=$(cat "$outPath"/foobar)
|
|
|
|
if test "$text" != "BARBAR"; then exit 1; fi
|