summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2012-02-16 14:05:01 +0000
committerPeter Simons <simons@cryp.to>2012-02-16 14:05:01 +0000
commitb7e432214b37e6b0fc940b271d1cc227b6974cb7 (patch)
tree4a120c5307d7d413781a7482f6c5e0bd1508fa28 /pkgs
parent9dbf57715a305dc5e00e93dcc329f9d419c7195f (diff)
downloadnixpkgs-b7e432214b37e6b0fc940b271d1cc227b6974cb7.tar
nixpkgs-b7e432214b37e6b0fc940b271d1cc227b6974cb7.tar.gz
nixpkgs-b7e432214b37e6b0fc940b271d1cc227b6974cb7.tar.bz2
nixpkgs-b7e432214b37e6b0fc940b271d1cc227b6974cb7.tar.lz
nixpkgs-b7e432214b37e6b0fc940b271d1cc227b6974cb7.tar.xz
nixpkgs-b7e432214b37e6b0fc940b271d1cc227b6974cb7.tar.zst
nixpkgs-b7e432214b37e6b0fc940b271d1cc227b6974cb7.zip
haskell-packages.nix: improved handling of 'Cabal'
Most packages use the Cabal library only as a build tool, and as such it is a
dependency of the cabal.nix builder -- not of the package that's being built
with that builder.

svn path=/nixpkgs/trunk/; revision=32326
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/haskell/cabal/cabal.nix4
-rw-r--r--pkgs/top-level/haskell-packages.nix2
2 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix
index 3f5bac4d7e4..8ae8c06d513 100644
--- a/pkgs/development/libraries/haskell/cabal/cabal.nix
+++ b/pkgs/development/libraries/haskell/cabal/cabal.nix
@@ -1,6 +1,6 @@
 # generic builder for Cabal packages
 
-{stdenv, fetchurl, lib, pkgconfig, ghc, enableLibraryProfiling ? false} :
+{stdenv, fetchurl, lib, pkgconfig, ghc, Cabal, enableLibraryProfiling ? false} :
 {
   mkDerivation =
     args : # arguments for the individual package, can modify the defaults
@@ -51,7 +51,7 @@
             # default buildInputs are just ghc, if more buildInputs are required
             # buildInputs can be extended by the client by using extraBuildInputs,
             # but often propagatedBuildInputs is preferable anyway
-            buildInputs = [ghc] ++ self.extraBuildInputs;
+            buildInputs = [ghc Cabal] ++ self.extraBuildInputs;
             extraBuildInputs = self.buildTools ++
                                (if self.pkgconfigDepends == [] then [] else [pkgconfig]) ++
                                (if self.isLibrary then [] else self.buildDepends ++ self.extraLibraries ++ self.pkgconfigDepends);
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 11d68f31cfd..803e42a1b94 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -502,7 +502,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   bytestringTrie = callPackage ../development/libraries/haskell/bytestring-trie {};
 
-  Cabal_1_14_0 = callPackage ../development/libraries/haskell/Cabal/1.14.0.nix {};
+  Cabal_1_14_0 = callPackage ../development/libraries/haskell/Cabal/1.14.0.nix { cabal = self.cabal.override { Cabal = null; }; };
   Cabal = null; # core package in GHC
 
   cabalFileTh = callPackage ../development/libraries/haskell/cabal-file-th {};