on iko/ghcjs-patch-master help sign in
Fix for tests broken in #359 (#371)
commitf08279b3b136793e1287c7906015c33889111c9d authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateThu 19 Dec 2019, 17:10 (7 years ago) parentfc68752
1 file changed+11−9
builder/comp-builder.nix+11−9
builder/comp-builder.nix+11−9
@@ -236,18 +236,20 @@ stdenv.mkDerivation ({
236236 "--html" \
237237 ${lib.optionalString doHoogle "--hoogle"} \
238238 ${lib.optionalString hyperlinkSource "--hyperlink-source"} \
239− ${lib.concatStringsSep " " (component.setupHaddockFlags ++ setupGhcOptions)} \
239+ ${lib.concatStringsSep " " (component.setupHaddockFlags ++ setupGhcOptions)}
240240
241241 html="dist/doc/html/${componentId.cname}"
242242
243− # Ensure that libraries are not pulled into the docs closure.
244− # As an example, the prettified source code of a
245− # Paths_package module will contain store paths of the library package.
246− for x in "$html/src/"*.html; do
247− remove-references-to -t $out $x
248− done
249−
250− cp -R "$html" "$docdir"/html
243+ if [ -d "$html" ]; then
244+ # Ensure that libraries are not pulled into the docs closure.
245+ # As an example, the prettified source code of a
246+ # Paths_package module will contain store paths of the library package.
247+ for x in "$html/src/"*.html; do
248+ remove-references-to -t $out $x
249+ done
250+
251+ cp -R "$html" "$docdir"/html
252+ fi
251253 }
252254 runHook postHaddock
253255 '';