From e9156086187b09970e5cdb5178450c73ae59ecd6 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 2 Jan 2020 16:05:45 -0500 Subject: haskell/with-packages-wrapper.nix: install "doc" outputs We were previously just installing the "out" output which broke when we recently changed to generating multiple outputs. Fixes #76837 --- pkgs/development/haskell-modules/with-packages-wrapper.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkgs') diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index 49beed8549d..eb8fad4af1b 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,12 +51,13 @@ 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 -- cgit 1.4.1 From 93aabab7605c21f5962df2dffa7fee9ac17ba848 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 6 Jan 2020 18:25:50 -0500 Subject: haskell/with-packages-wrapper.nix: remove /bin symlink if it exists The wrapper need a writable directory to work, so remove the symlink to a read-only one if it occurs. --- pkgs/development/haskell-modules/with-packages-wrapper.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkgs') diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index eb8fad4af1b..404fd0d9440 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -61,6 +61,15 @@ buildEnv { 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 -- cgit 1.4.1