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

View File

@ -102,8 +102,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
# argument to this function.
ghcWithPackages = pkgs : callPackage ../development/compilers/ghc/with-packages.nix {
ghc = ghc; # refers to ghcPlain
ghc = ghc; # refers to ghcPlain
packages = pkgs self;
ignoreCollisions = false;
};
ghcWithPackagesOld = pkgs : callPackage ../development/compilers/ghc/with-packages-old.nix {