haskellPackages.ghcWithPackages: Wrap haddock with GHC lib dir
This commit is contained in:
parent
cc4677c36e
commit
2956cc8760
|
@ -95,6 +95,15 @@ symlinkJoin {
|
||||||
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
|
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
|
||||||
fi
|
fi
|
||||||
done
|
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 ''
|
'' + (lib.optionalString targetPlatform.isDarwin ''
|
||||||
# Work around a linker limit in macOS Sierra (see generic-builder.nix):
|
# Work around a linker limit in macOS Sierra (see generic-builder.nix):
|
||||||
local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
|
local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
|
||||||
|
|
Loading…
Reference in New Issue