pkgs/development/compilers/ghc/with-packages.nix: add 'ignoreCollisions' parameter

The ghcWithPackage expression now has an argument 'ignoreCollisions' that
allows users to disable the path collision check like so:

  (pkgs.haskellPackages.ghcWithPackages (pkgs: with pkgs; [ haskellPlatform ])).override { ignoreCollisions = true; };

See d64917ad17
for a long and detailed discussion of why these path collisions may occur.
This commit is contained in:
Peter Simons
2013-11-07 12:09:38 +01:00
parent 89c566fcfd
commit f92a5cbfc6
2 changed files with 4 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
{ stdenv, ghc, packages, buildEnv, makeWrapper }:
{ stdenv, ghc, packages, buildEnv, makeWrapper, ignoreCollisions ? false }:
assert packages != [];
@@ -12,6 +12,7 @@ in
buildEnv {
name = "haskell-env-${ghc.name}";
paths = stdenv.lib.filter isHaskellPkg (stdenv.lib.closePropagation packages) ++ [ghc];
inherit ignoreCollisions;
postBuild = ''
. ${makeWrapper}/nix-support/setup-hook