on iko/ghcjs-patch-master help sign in
allow empty packages
d6255c9Moritz Angermann
builder/comp-builder.nix+8−1
@@ -208,11 +208,18 @@ stdenv.mkDerivation ({
208 docdir="${docdir "$doc"}"
208 docdir="${docdir "$doc"}"
209 mkdir -p "$docdir"
209 mkdir -p "$docdir"
210
210
211+ # We accept that this might not produce any
212+ # output (hence the || true). Depending of
213+ # configuration flags, there might just be no
214+ # modules to run haddock on. E.g. a package
215+ # might turn into an empty one (see the fail
216+ # pkg).
211 $SETUP_HS haddock \
217 $SETUP_HS haddock \
212 "--html" \
218 "--html" \
213 ${lib.optionalString doHoogle "--hoogle"} \
219 ${lib.optionalString doHoogle "--hoogle"} \
214 ${lib.optionalString hyperlinkSource "--hyperlink-source"} \
220 ${lib.optionalString hyperlinkSource "--hyperlink-source"} \
215− ${lib.concatStringsSep " " (component.setupHaddockFlags ++ setupGhcOptions)}
221+ ${lib.concatStringsSep " " (component.setupHaddockFlags ++ setupGhcOptions)} \
222+ || true
216
223
217 html="dist/doc/html/${componentId.cname}"
224 html="dist/doc/html/${componentId.cname}"
218
225