From 459234db2067055801d13ed2ba36879c3de67180 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 21 Mar 2013 16:25:50 +0100 Subject: [PATCH] ghc-with-packages: include only derivations in the generated environment that have a ghc attribute This predicate filters out packages that weren't created by the Cabal builder. Doing that greatly reduces the likelihood of file collisions in the generated environment, because Haskell packages tend to have a lot of propagated build inputs. For example, both zeromq 2.x and 3.x use the same names for their header files. Users of haskell-zeromq don't need those headers, so we just don't include them in the generated environment to avoid the collision that would otherwise occur when haskell-zeromq 2.x and 3.x are installed into the same environment. --- pkgs/development/compilers/ghc/with-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/with-packages.nix b/pkgs/development/compilers/ghc/with-packages.nix index 74a8253b8386..afdaea44d5b1 100644 --- a/pkgs/development/compilers/ghc/with-packages.nix +++ b/pkgs/development/compilers/ghc/with-packages.nix @@ -10,7 +10,7 @@ let in buildEnv { name = "haskell-env-${ghc.name}"; - paths = stdenv.lib.closePropagation (packages ++ [ghc]); + paths = stdenv.lib.filter (x: x ? ghc) (stdenv.lib.closePropagation (packages ++ [ghc])); postBuild = '' . ${makeWrapper}/nix-support/setup-hook