Merge pull request #21916 from Profpatsch/ghcWithPackages-docs

haskell: add doc outputs to with-packages-wrapper.nix
This commit is contained in:
Peter Simons 2017-01-16 10:58:06 +01:00 committed by GitHub
commit 656707ef80

View File

@ -54,10 +54,12 @@ buildEnv {
# as a dedicated drv attribute, like `compiler-name`
name = ghc.name + "-with-packages";
paths = paths ++ [ghc];
extraOutputsToInstall = [ "out" "doc" ];
inherit ignoreCollisions;
postBuild = ''
. ${makeWrapper}/nix-support/setup-hook
# Work around buildEnv sometimes deciding to make bin a symlink
if test -L "$out/bin"; then
binTarget="$(readlink -f "$out/bin")"
rm "$out/bin"
@ -65,6 +67,8 @@ buildEnv {
chmod u+w "$out/bin"
fi
# wrap compiler executables with correct env variables
for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do
if [[ -x "${ghc}/bin/$prg" ]]; then
rm -f $out/bin/$prg