fix nix testing infra

This commit is contained in:
atagen 2024-12-03 14:19:30 +11:00
parent 0267c59227
commit 92e539754c
2 changed files with 16 additions and 5 deletions

View file

@ -4,6 +4,7 @@
ocamlPackages,
version,
debug ? false,
doCheck ? false,
...
}:
ocamlPackages.buildDunePackage {
@ -19,12 +20,19 @@ ocamlPackages.buildDunePackage {
if debug
then ''
runHook preBuild
dune build --profile debug -p culr ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
dune build -p culr --profile debug ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
runHook postBuild
''
else ''
runHook preBuild
dune build --profile release -p culr ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
dune build -p culr --profile release ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
runHook postBuild
'';
checkPhase = ''
dune runtest
'';
inherit doCheck;
meta.mainProgram = "culr";
}