mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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
@ -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 New Issue
Block a user