Skip to content

Commit d5fe0a3

Browse files
committed
Run custom preprocessors before setup haddock
Run `setup build --with-ghc=false || true` before running `setup haddock` to make sure the preprocessor outputs of any custom build step are present. Fixes #2243
1 parent 07980c9 commit d5fe0a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builder/haddock-builder.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ let
109109
110110
# If we don't have any source files, no need to run haddock
111111
[[ -n $(find . -name "*.hs" -o -name "*.lhs") ]] && {
112+
# Run any preprocessor in the custom build step
113+
$SETUP_HS build \
114+
"--with-ghc=false" \
115+
${lib.optionalString (haskellLib.isTest componentId) "--tests"} \
116+
${lib.concatStringsSep " " setupHaddockFlags} || true
117+
112118
$SETUP_HS haddock \
113119
"--html" \
114120
${lib.optionalString (haskellLib.isTest componentId) "--tests"} \

0 commit comments

Comments
 (0)