Revert "haskell/with-packages-wrapper.nix: install "doc" outputs"

This commit is contained in:
Peter Simons 2020-01-10 15:20:08 +01:00 committed by GitHub
parent 01d93cbbe1
commit 4a2aad0d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, stdenv, ghc, llvmPackages, packages, buildEnv, makeWrapper { lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
, withLLVM ? false , withLLVM ? false
, postBuild ? "" , postBuild ? ""
, ghcLibdir ? null # only used by ghcjs, when resolving plugins , ghcLibdir ? null # only used by ghcjs, when resolving plugins
@ -51,25 +51,15 @@ let
++ lib.optional stdenv.targetPlatform.isDarwin llvmPackages.clang); ++ lib.optional stdenv.targetPlatform.isDarwin llvmPackages.clang);
in in
if paths == [] && !withLLVM then ghc else if paths == [] && !withLLVM then ghc else
buildEnv { symlinkJoin {
# this makes computing paths from the name attribute impossible; # this makes computing paths from the name attribute impossible;
# if such a feature is needed, the real compiler name should be saved # if such a feature is needed, the real compiler name should be saved
# as a dedicated drv attribute, like `compiler-name` # as a dedicated drv attribute, like `compiler-name`
name = ghc.name + "-with-packages"; name = ghc.name + "-with-packages";
paths = paths ++ [ghc]; paths = paths ++ [ghc];
extraOutputsToInstall = ["doc"];
postBuild = '' postBuild = ''
. ${makeWrapper}/nix-support/setup-hook . ${makeWrapper}/nix-support/setup-hook
# We make changes to ghc binaries in $out/bin. buildEnv gives a
# symlink if only one of the paths has the subdirectory. If so,
# we need to remove it for our new wrappers.
if [ -L "$out/bin" ]; then
rm -f "$out/bin"
mkdir -p "$out/bin"
fi
# wrap compiler executables with correct env variables # wrap compiler executables with correct env variables
for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do