buildDunePackage: add support for pre and post phase hooks
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
This commit is contained in:
parent
794158fcd5
commit
406405d8bd
1 changed files with 15 additions and 3 deletions
|
@ -9,9 +9,21 @@ else
|
|||
|
||||
stdenv.mkDerivation ({
|
||||
|
||||
buildPhase = "dune build -p ${pname}";
|
||||
checkPhase = "dune runtest -p ${pname}";
|
||||
inherit (dune) installPhase;
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
dune build -p ${pname}
|
||||
runHook postBuild
|
||||
'';
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
dune runtest -p ${pname}
|
||||
runHook postCheck
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
${dune.installPhase}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta.platform = ocaml.meta.platform;
|
||||
|
||||
|
|
Loading…
Reference in a new issue