diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-01-07 00:23:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-07 00:23:15 -0500 |
commit | ddcaa0cd2f20eefbb79818132c3215678d68d260 (patch) | |
tree | e2b794d9e97e7e97be9fca2081cfa21c580a7bf0 /pkgs/development/haskell-modules | |
parent | 370355449f89164f6239031ced8728dcf0bdaa8b (diff) | |
parent | 93aabab7605c21f5962df2dffa7fee9ac17ba848 (diff) | |
download | nixpkgs-ddcaa0cd2f20eefbb79818132c3215678d68d260.tar nixpkgs-ddcaa0cd2f20eefbb79818132c3215678d68d260.tar.gz nixpkgs-ddcaa0cd2f20eefbb79818132c3215678d68d260.tar.bz2 nixpkgs-ddcaa0cd2f20eefbb79818132c3215678d68d260.tar.lz nixpkgs-ddcaa0cd2f20eefbb79818132c3215678d68d260.tar.xz nixpkgs-ddcaa0cd2f20eefbb79818132c3215678d68d260.tar.zst nixpkgs-ddcaa0cd2f20eefbb79818132c3215678d68d260.zip |
Merge pull request #76842 from matthewbauer/add-doc-to-ghc-wrapper
haskell/with-packages-wrapper.nix: install "doc" outputs
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r-- | pkgs/development/haskell-modules/with-packages-wrapper.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index 49beed8549d..404fd0d9440 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper +{ lib, stdenv, ghc, llvmPackages, packages, buildEnv, makeWrapper , withLLVM ? false , postBuild ? "" , ghcLibdir ? null # only used by ghcjs, when resolving plugins @@ -51,15 +51,25 @@ let ++ lib.optional stdenv.targetPlatform.isDarwin llvmPackages.clang); in if paths == [] && !withLLVM then ghc else -symlinkJoin { +buildEnv { # this makes computing paths from the name attribute impossible; # if such a feature is needed, the real compiler name should be saved # as a dedicated drv attribute, like `compiler-name` name = ghc.name + "-with-packages"; paths = paths ++ [ghc]; + extraOutputsToInstall = ["doc"]; postBuild = '' . ${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 for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do |