1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00

nix-build: Honor user-provided `failureHook'.

svn path=/nixpkgs/trunk/; revision=32680
This commit is contained in:
Ludovic Courtès 2012-02-28 17:10:50 +00:00
parent a70a76086c
commit bd68cc6f5b

View file

@ -12,6 +12,7 @@
, lcovExtraTraceFiles ? []
, src, stdenv
, name ? if doCoverageAnalysis then "nix-coverage" else "nix-build"
, failureHook ? null
, ... } @ args:
stdenv.mkDerivation (
@ -37,7 +38,8 @@ stdenv.mkDerivation (
fi
'';
failureHook = ''
failureHook = (stdenv.lib.optionalString (failureHook != null) failureHook) +
''
if test -n "$succeedOnFailure"; then
if test -n "$keepBuildDirectory"; then
KEEPBUILDDIR="$out/`basename $TMPDIR`"