Skip to content

Commit 4cbda25

Browse files
committed
New attempt to fix the build
Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
1 parent 819142a commit 4cbda25

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

nix/bibfmt.nix

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
with ocamlPackages;
1010

11-
buildDunePackage {
11+
buildDunePackage ({
1212
pname = "bibfmt";
1313
version = "n/a";
1414
src = with nix-filter; filter {
@@ -26,15 +26,19 @@ buildDunePackage {
2626
re
2727
];
2828

29-
buildPhase = ''
30-
echo "running\
31-
${if static then "static" else "release"} build\
32-
${if crossName != null then "for ${crossName}" else ""}"
29+
} // lib.optionalAttrs (crossName == null) {
3330

34-
dune build -p bibfmt -j $NIX_BUILD_CORES --display=short --profile=${if static then "static" else "release"}
31+
buildPhase = ''
32+
runHook preBuild
33+
echo "running ${if static then "static" else "release"} build"
34+
dune build -p bibfmt -j $NIX_BUILD_CORES --display=short --profile=${if static then "static" else "release"} @install
35+
runHook postBuild
3536
'';
3637

37-
postInstall = lib.optionalString (crossName != null) ''
38+
} // lib.optionalAttrs (crossName != null) {
39+
40+
postInstall = ''
3841
ln -sf $out/bin/bibfmt $out/bin/bibfmt-${crossName}
3942
'';
40-
}
43+
44+
})

0 commit comments

Comments
 (0)