From 142b4172849cdca56f2d0fac70fe436b867b7752 Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Mon, 1 Feb 2016 00:10:45 -0500 Subject: [PATCH] ghcWithHoogle: fix haddocks for GHCJS builtin libs --- pkgs/development/haskell-modules/hoogle.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/hoogle.nix b/pkgs/development/haskell-modules/hoogle.nix index b805195bc927..58db9737d32c 100644 --- a/pkgs/development/haskell-modules/hoogle.nix +++ b/pkgs/development/haskell-modules/hoogle.nix @@ -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