ghcWithHoogle: fix haddocks for GHCJS builtin libs
This commit is contained in:
parent
1a2d7c679a
commit
142b417284
@ -31,6 +31,7 @@ let
|
|||||||
inherit (stdenv.lib) optional;
|
inherit (stdenv.lib) optional;
|
||||||
wrapper = ./hoogle-local-wrapper.sh;
|
wrapper = ./hoogle-local-wrapper.sh;
|
||||||
isGhcjs = ghc.isGhcjs or false;
|
isGhcjs = ghc.isGhcjs or false;
|
||||||
|
opts = lib.optionalString;
|
||||||
haddockExe =
|
haddockExe =
|
||||||
if !isGhcjs
|
if !isGhcjs
|
||||||
then "haddock"
|
then "haddock"
|
||||||
@ -79,9 +80,11 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
echo importing builtin packages
|
echo importing builtin packages
|
||||||
for docdir in ${ghc}/${docLibGlob}/*; do
|
for docdir in ${ghc}/${docLibGlob}/*; do
|
||||||
|
name="$(basename $docdir)"
|
||||||
|
${opts isGhcjs ''docdir="$docdir/html"''}
|
||||||
if [[ -d $docdir ]]; then
|
if [[ -d $docdir ]]; then
|
||||||
import_dbs $docdir
|
import_dbs $docdir
|
||||||
ln -sfn $docdir $out/share/doc/hoogle
|
ln -sfn $docdir $out/share/doc/hoogle/$name
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user