summary refs log tree commit diff
path: root/pkgs/build-support/release
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-02-28 17:10:50 +0000
committerLudovic Courtès <ludo@gnu.org>2012-02-28 17:10:50 +0000
commitbd68cc6f5b9680cf3197e3306850a101e7b69fdd (patch)
treeab036101ba6127b546424120dd799b04ffad3eb8 /pkgs/build-support/release
parenta70a76086c2553000497ab21dc371bc296c3e3d4 (diff)
downloadnixpkgs-bd68cc6f5b9680cf3197e3306850a101e7b69fdd.tar
nixpkgs-bd68cc6f5b9680cf3197e3306850a101e7b69fdd.tar.gz
nixpkgs-bd68cc6f5b9680cf3197e3306850a101e7b69fdd.tar.bz2
nixpkgs-bd68cc6f5b9680cf3197e3306850a101e7b69fdd.tar.lz
nixpkgs-bd68cc6f5b9680cf3197e3306850a101e7b69fdd.tar.xz
nixpkgs-bd68cc6f5b9680cf3197e3306850a101e7b69fdd.tar.zst
nixpkgs-bd68cc6f5b9680cf3197e3306850a101e7b69fdd.zip
nix-build: Honor user-provided `failureHook'.
svn path=/nixpkgs/trunk/; revision=32680
Diffstat (limited to 'pkgs/build-support/release')
-rw-r--r--pkgs/build-support/release/nix-build.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/release/nix-build.nix b/pkgs/build-support/release/nix-build.nix
index a32f0e07a0c..f734e1eefe5 100644
--- a/pkgs/build-support/release/nix-build.nix
+++ b/pkgs/build-support/release/nix-build.nix
@@ -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`"