allow empty packages

fixes #50
This commit is contained in:
Moritz Angermann 2019-10-22 09:45:40 +08:00
parent 4bc3b472d4
commit d6255c97aa
No known key found for this signature in database
GPG Key ID: A98C646D142C675F

View File

@ -208,11 +208,18 @@ stdenv.mkDerivation ({
docdir="${docdir "$doc"}"
mkdir -p "$docdir"
# We accept that this might not produce any
# output (hence the || true). Depending of
# configuration flags, there might just be no
# modules to run haddock on. E.g. a package
# might turn into an empty one (see the fail
# pkg).
$SETUP_HS haddock \
"--html" \
${lib.optionalString doHoogle "--hoogle"} \
${lib.optionalString hyperlinkSource "--hyperlink-source"} \
${lib.concatStringsSep " " (component.setupHaddockFlags ++ setupGhcOptions)}
${lib.concatStringsSep " " (component.setupHaddockFlags ++ setupGhcOptions)} \
|| true
html="dist/doc/html/${componentId.cname}"