diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index 2dcf206cec9..c49b81762e7 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -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