3
0
Fork 0
forked from mirrors/nixpkgs

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
This commit is contained in:
Peter Simons 2012-02-16 14:05:01 +00:00
parent 9dbf57715a
commit b7e432214b
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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 {};