nixBuild: Respect the preHook/postHook of the caller

This commit is contained in:
Eelco Dolstra 2014-11-06 11:12:29 +01:00
parent 7ff232e958
commit f01ecbee50

View File

@ -18,6 +18,8 @@
, prePhases ? []
, postPhases ? []
, buildInputs ? []
, preHook ? ""
, postHook ? ""
, ... } @ args:
let
@ -90,6 +92,7 @@ stdenv.mkDerivation (
. ${./functions.sh}
origSrc=$src
src=$(findTarball $src)
${postHook}
'';
preHook = ''
@ -105,6 +108,8 @@ stdenv.mkDerivation (
shopt -s expand_aliases
alias make="scan-build -o _clang_analyze_$name --html-title='Scan results for $name' make"
fi
${preHook}
'';
# Clean up after analysis