ghcWithHoogle: fix haddocks for GHCJS builtin libs

This commit is contained in:
Charles Strahan 2016-02-01 00:10:45 -05:00
parent 1a2d7c679a
commit 142b417284

View File

@ -31,6 +31,7 @@ let
inherit (stdenv.lib) optional;
wrapper = ./hoogle-local-wrapper.sh;
isGhcjs = ghc.isGhcjs or false;
opts = lib.optionalString;
haddockExe =
if !isGhcjs
then "haddock"
@ -79,9 +80,11 @@ stdenv.mkDerivation {
echo importing builtin packages
for docdir in ${ghc}/${docLibGlob}/*; do
name="$(basename $docdir)"
${opts isGhcjs ''docdir="$docdir/html"''}
if [[ -d $docdir ]]; then
import_dbs $docdir
ln -sfn $docdir $out/share/doc/hoogle
ln -sfn $docdir $out/share/doc/hoogle/$name
fi
done