summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-03-19 10:27:36 -0400
committerGitHub <noreply@github.com>2018-03-19 10:27:36 -0400
commit81da63f00354482fe5e0078733bb89659a9066d1 (patch)
tree714a4a3dde1c5e70463febcc612c09558bd8722d /pkgs/development
parentf97c4668abb630875318f057d452f8ebfe52f8e2 (diff)
parent2956cc87603b1961ddc0f930c07e51c82613b59a (diff)
downloadnixlib-81da63f00354482fe5e0078733bb89659a9066d1.tar
nixlib-81da63f00354482fe5e0078733bb89659a9066d1.tar.gz
nixlib-81da63f00354482fe5e0078733bb89659a9066d1.tar.bz2
nixlib-81da63f00354482fe5e0078733bb89659a9066d1.tar.lz
nixlib-81da63f00354482fe5e0078733bb89659a9066d1.tar.xz
nixlib-81da63f00354482fe5e0078733bb89659a9066d1.tar.zst
nixlib-81da63f00354482fe5e0078733bb89659a9066d1.zip
Merge pull request #37132 from srhb/haddock-wrapped
haskellPackages.ghcWithPackages: Wrap haddock with GHC lib dir
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/haskell-modules/with-packages-wrapper.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index d858787f43cd..03f0a1dd0a3e 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -95,6 +95,15 @@ symlinkJoin {
         makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
       fi
     done
+
+    # haddock was referring to the base ghc, https://github.com/NixOS/nixpkgs/issues/36976
+    if [[ -x "${ghc}/bin/haddock" ]]; then
+      rm -f $out/bin/haddock
+      makeWrapper ${ghc}/bin/haddock $out/bin/haddock    \
+        --add-flags '"-B$NIX_${ghcCommandCaps}_LIBDIR"'  \
+        --set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}"
+    fi
+
   '' + (lib.optionalString targetPlatform.isDarwin ''
     # Work around a linker limit in macOS Sierra (see generic-builder.nix):
     local packageConfDir="$out/lib/${ghc.name}/package.conf.d";