forked from mirrors/nixpkgs
nixBuild: Respect the preHook/postHook of the caller
This commit is contained in:
parent
7ff232e958
commit
f01ecbee50
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue