Merge pull request #2576 from NixOS/haskellPackagesFixpoint

Rework the knot-tying code for defining Haskell packages.
This commit is contained in:
Peter Simons 2014-05-09 18:11:47 +02:00
commit 0e0e03976c
2 changed files with 75 additions and 88 deletions

View File

@ -16,52 +16,52 @@
# for a particular GHC version.
ghcHEADPrefs =
self : self.haskellPlatformArgs_future self // {
self : super : super.haskellPlatformArgs_future self // {
haskellPlatform = null;
extensibleExceptions = self.extensibleExceptions_0_1_1_4;
binary_0_7_1_0 = null;
};
ghc763Prefs =
self : self.haskellPlatformArgs_2013_2_0_0 self // {
self : super : super.haskellPlatformArgs_2013_2_0_0 self // {
haskellPlatform = self.haskellPlatform_2013_2_0_0;
extensibleExceptions = self.extensibleExceptions_0_1_1_4;
};
ghc742Prefs =
self : self.haskellPlatformArgs_2012_4_0_0 self // {
self : super : super.haskellPlatformArgs_2012_4_0_0 self // {
haskellPlatform = self.haskellPlatform_2012_4_0_0;
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
cabal2nix = super.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
haskeline = self.haskeline_0_7_1_1;
terminfo = self.terminfo_0_3_2_6;
};
ghc741Prefs =
self : self.haskellPlatformArgs_2012_2_0_0 self // {
self : super : super.haskellPlatformArgs_2012_2_0_0 self // {
haskellPlatform = self.haskellPlatform_2012_2_0_0;
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
cabal2nix = super.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
haskeline = self.haskeline_0_7_1_1;
terminfo = self.terminfo_0_3_2_6;
};
ghc722Prefs =
self : self.haskellPlatformArgs_2012_2_0_0 self // {
self : super : super.haskellPlatformArgs_2012_2_0_0 self // {
haskellPlatform = self.haskellPlatform_2012_2_0_0;
deepseq = self.deepseq_1_3_0_2;
cabalInstall_0_14_0 = self.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; };
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
cabalInstall_1_20_0_1 = self.cabalInstall_1_20_0_1.override { HTTP = self.HTTP_4000_2_14; };
cabalInstall = self.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; };
cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
cabalInstall_0_14_0 = super.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; };
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
cabalInstall_1_20_0_1 = super.cabalInstall_1_20_0_1.override { HTTP = self.HTTP_4000_2_14; };
cabalInstall = super.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; };
cabal2nix = super.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
binary = self.binary_0_6_0_0;
prettyShow = self.prettyShow_1_2;
quickcheckIo = self.quickcheckIo.override {
quickcheckIo = super.quickcheckIo.override {
HUnit = self.HUnit_1_2_5_2;
QuickCheck = self.QuickCheck2;
};
hspecExpectations = self.hspecExpectations.override {
hspecExpectations = super.hspecExpectations.override {
HUnit = self.HUnit_1_2_5_2;
};
haskeline = self.haskeline_0_7_1_1;
@ -71,21 +71,21 @@
ghc721Prefs = ghc722Prefs;
ghc704Prefs =
self : self.haskellPlatformArgs_2011_4_0_0 self // {
self : super : super.haskellPlatformArgs_2011_4_0_0 self // {
haskellPlatform = self.haskellPlatform_2011_4_0_0;
cabalInstall_0_14_0 = self.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; };
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
cabalInstall_0_14_0 = super.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; };
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
monadPar = self.monadPar_0_1_0_3;
jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
jailbreakCabal = super.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = super.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
prettyShow = self.prettyShow_1_2;
binary = self.binary_0_6_0_0;
Cabal_1_18_1_3 = self.Cabal_1_18_1_3.override { deepseq = self.deepseq_1_3_0_2; };
quickcheckIo = self.quickcheckIo.override {
Cabal_1_18_1_3 = super.Cabal_1_18_1_3.override { deepseq = self.deepseq_1_3_0_2; };
quickcheckIo = super.quickcheckIo.override {
HUnit = self.HUnit_1_2_5_2;
QuickCheck = self.QuickCheck2;
};
hspecExpectations = self.hspecExpectations.override {
hspecExpectations = super.hspecExpectations.override {
HUnit = self.HUnit_1_2_5_2;
};
haskeline = self.haskeline_0_7_1_1;
@ -93,21 +93,21 @@
};
ghc703Prefs =
self : self.haskellPlatformArgs_2011_2_0_1 self // {
self : super : super.haskellPlatformArgs_2011_2_0_1 self // {
haskellPlatform = self.haskellPlatform_2011_2_0_1;
cabalInstall_0_14_0 = self.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; zlib = self.zlib_0_5_3_3; };
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; zlib = self.zlib_0_5_3_3; };
cabalInstall_0_14_0 = super.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; zlib = self.zlib_0_5_3_3; };
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; zlib = self.zlib_0_5_3_3; };
monadPar = self.monadPar_0_1_0_3;
jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
jailbreakCabal = super.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = super.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
prettyShow = self.prettyShow_1_2;
binary = self.binary_0_6_0_0;
Cabal_1_18_1_3 = self.Cabal_1_18_1_3.override { deepseq = self.deepseq_1_3_0_2; };
quickcheckIo = self.quickcheckIo.override {
Cabal_1_18_1_3 = super.Cabal_1_18_1_3.override { deepseq = self.deepseq_1_3_0_2; };
quickcheckIo = super.quickcheckIo.override {
HUnit = self.HUnit_1_2_5_2;
QuickCheck = self.QuickCheck2;
};
hspecExpectations = self.hspecExpectations.override {
hspecExpectations = super.hspecExpectations.override {
HUnit = self.HUnit_1_2_5_2;
};
haskeline = self.haskeline_0_7_1_1;
@ -117,21 +117,21 @@
ghc702Prefs = ghc701Prefs;
ghc701Prefs =
self : self.haskellPlatformArgs_2011_2_0_0 self // {
self : super : super.haskellPlatformArgs_2011_2_0_0 self // {
haskellPlatform = self.haskellPlatform_2011_2_0_0;
cabalInstall_0_14_0 = self.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; zlib = self.zlib_0_5_3_3; };
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; zlib = self.zlib_0_5_3_3; };
cabalInstall_0_14_0 = super.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; zlib = self.zlib_0_5_3_3; };
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; zlib = self.zlib_0_5_3_3; };
monadPar = self.monadPar_0_1_0_3;
jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
jailbreakCabal = super.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = super.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
prettyShow = self.prettyShow_1_2;
binary = self.binary_0_6_0_0;
Cabal_1_18_1_3 = self.Cabal_1_18_1_3.override { deepseq = self.deepseq_1_3_0_2; };
quickcheckIo = self.quickcheckIo.override {
Cabal_1_18_1_3 = super.Cabal_1_18_1_3.override { deepseq = self.deepseq_1_3_0_2; };
quickcheckIo = super.quickcheckIo.override {
HUnit = self.HUnit_1_2_5_2;
QuickCheck = self.QuickCheck2;
};
hspecExpectations = self.hspecExpectations.override {
hspecExpectations = super.hspecExpectations.override {
HUnit = self.HUnit_1_2_5_2;
};
haskeline = self.haskeline_0_7_1_1;
@ -141,25 +141,26 @@
ghc6123Prefs = ghc6122Prefs;
ghc6122Prefs =
self : self.haskellPlatformArgs_2010_2_0_0 self // {
haskellPlatform = self.haskellPlatform_2010_2_0_0;
self : super : super.haskellPlatformArgs_2010_2_0_0 self // {
haskellPlatform = super.haskellPlatform_2010_2_0_0;
mtl1 = self.mtl_1_1_0_2;
monadPar = self.monadPar_0_1_0_3;
deepseq = self.deepseq_1_1_0_2;
# deviating from Haskell platform here, to make some packages (notably statistics) compile
jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
jailbreakCabal = super.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = super.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
binary = self.binary_0_6_0_0;
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override {
Cabal = self.Cabal_1_16_0_3; zlib = self.zlib_0_5_3_3;
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override {
Cabal = self.Cabal_1_16_0_3;
zlib = self.zlib_0_5_3_3;
mtl = self.mtl_2_1_2;
HTTP = self.HTTP_4000_1_1.override { mtl = self.mtl_2_1_2; };
};
quickcheckIo = self.quickcheckIo.override {
quickcheckIo = super.quickcheckIo.override {
HUnit = self.HUnit_1_2_5_2;
QuickCheck = self.QuickCheck2;
};
hspecExpectations = self.hspecExpectations.override {
hspecExpectations = super.hspecExpectations.override {
HUnit = self.HUnit_1_2_5_2;
};
haskeline = self.haskeline_0_7_1_1;
@ -167,27 +168,27 @@
};
ghc6121Prefs =
self : self.haskellPlatformArgs_2010_1_0_0 self // {
self : super : super.haskellPlatformArgs_2010_1_0_0 self // {
haskellPlatform = self.haskellPlatform_2010_1_0_0;
mtl1 = self.mtl_1_1_0_2;
extensibleExceptions = self.extensibleExceptions_0_1_1_0;
deepseq = self.deepseq_1_1_0_2;
monadPar = self.monadPar_0_1_0_3;
# deviating from Haskell platform here, to make some packages (notably statistics) compile
jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
jailbreakCabal = super.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
cabal2nix = super.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
binary = self.binary_0_6_0_0;
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override {
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override {
Cabal = self.Cabal_1_16_0_3;
zlib = self.zlib_0_5_3_3;
mtl = self.mtl_2_1_2;
HTTP = self.HTTP_4000_1_1.override { mtl = self.mtl_2_1_2; };
};
quickcheckIo = self.quickcheckIo.override {
quickcheckIo = super.quickcheckIo.override {
HUnit = self.HUnit_1_2_5_2;
QuickCheck = self.QuickCheck2;
};
hspecExpectations = self.hspecExpectations.override {
hspecExpectations = super.hspecExpectations.override {
HUnit = self.HUnit_1_2_5_2;
};
haskeline = self.haskeline_0_7_1_1;
@ -195,18 +196,18 @@
};
ghc6104Prefs =
self : self.haskellPlatformArgs_2009_2_0_2 self // {
self : super : super.haskellPlatformArgs_2009_2_0_2 self // {
haskellPlatform = self.haskellPlatform_2009_2_0_2;
mtl = self.mtl_1_1_0_2;
mtl = self.mtl1;
mtl1 = self.mtl_1_1_0_2;
extensibleExceptions = self.extensibleExceptions_0_1_1_0;
text = self.text_0_11_0_6;
deepseq = self.deepseq_1_1_0_2;
monadPar = self.monadPar_0_1_0_3;
# deviating from Haskell platform here, to make some packages (notably statistics) compile
jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
jailbreakCabal = super.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
binary = self.binary_0_6_0_0;
cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override {
cabalInstall_1_16_0_2 = super.cabalInstall_1_16_0_2.override {
Cabal = self.Cabal_1_16_0_3;
zlib = self.zlib_0_5_3_3;
mtl = self.mtl_2_1_2;
@ -221,20 +222,22 @@
({ ghcPath
, ghcBinary ? ghc6101Binary
, prefFun
, extraPrefs ? (x : {})
, extension ? (self : super : {})
, profExplicit ? false, profDefault ? false
, modifyPrio ? lowPrio
, extraArgs ? {}
} :
import ./haskell-packages.nix {
inherit pkgs newScope modifyPrio;
prefFun = self : super : self // prefFun super // extraPrefs super;
# prefFun = self : super : self;
enableLibraryProfiling =
if profExplicit then profDefault
else config.cabal.libraryProfiling or profDefault;
ghc = callPackage ghcPath ({ ghc = ghcBinary; } // extraArgs);
});
let haskellPackagesClass = import ./haskell-packages.nix {
inherit pkgs newScope modifyPrio;
enableLibraryProfiling =
if profExplicit then profDefault
else config.cabal.libraryProfiling or profDefault;
ghc = callPackage ghcPath ({ ghc = ghcBinary; } // extraArgs);
};
haskellPackagesPrefsClass = self : let super = haskellPackagesClass self; in super // prefFun self super;
haskellPackagesExtensionClass = self : let super = haskellPackagesPrefsClass self; in super // extension self super;
haskellPackages = haskellPackagesExtensionClass haskellPackages;
in haskellPackages);
defaultVersionPrioFun =
profDefault :

View File

@ -58,7 +58,7 @@
#
# For most packages, however, we keep only one version, and use default.nix.
{ pkgs, newScope, ghc, prefFun, modifyPrio ? (x : x)
{ pkgs, newScope, ghc, modifyPrio ? (x : x)
, enableLibraryProfiling ? false
, enableSharedLibraries ? pkgs.stdenv.lib.versionOlder "7.7" ghc.version
, enableSharedExecutables ? pkgs.stdenv.lib.versionOlder "7.7" ghc.version
@ -70,17 +70,13 @@
# modifyPrio argument can be set to lowPrio to make all Haskell packages have
# low priority.
let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x y);
self = (prefFun result) result; in
self : let callPackage = x : y : modifyPrio (newScope self x y); in
# Indentation deliberately broken at this point to keep the bulk
# of this file at a low indentation level.
{
finalReturn = self;
callPackage = callPackage;
inherit callPackage;
# GHC and its wrapper
#
@ -140,7 +136,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
# NOTE: 2013.2.0.0 is the current default.
haskellPlatformArgs_future = self : {
inherit (self) cabal ghc;
async = self.async_2_0_1_5;
attoparsec = self.attoparsec_0_11_3_0;
caseInsensitive = self.caseInsensitive_1_2_0_0;
@ -181,7 +176,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
};
haskellPlatformArgs_2013_2_0_0 = self : {
inherit (self) cabal ghc;
async = self.async_2_0_1_4;
attoparsec = self.attoparsec_0_10_4_0;
caseInsensitive = self.caseInsensitive_1_0_0_1;
@ -226,7 +220,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
(self.haskellPlatformArgs_2013_2_0_0 self);
haskellPlatformArgs_2012_4_0_0 = self : {
inherit (self) cabal ghc;
async = self.async_2_0_1_3;
cgi = self.cgi_3001_1_7_4;
fgl = self.fgl_5_4_2_4;
@ -265,7 +258,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
(self.haskellPlatformArgs_2012_4_0_0 self);
haskellPlatformArgs_2012_2_0_0 = self : {
inherit (self) cabal ghc;
cgi = self.cgi_3001_1_7_4;
fgl = self.fgl_5_4_2_4;
GLUT = self.GLUT_2_1_2_1;
@ -300,7 +292,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
(self.haskellPlatformArgs_2012_2_0_0 self);
haskellPlatformArgs_2011_4_0_0 = self : {
inherit (self) cabal ghc;
cgi = self.cgi_3001_1_7_4;
fgl = self.fgl_5_4_2_4;
GLUT = self.GLUT_2_1_2_1;
@ -335,7 +326,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
(self.haskellPlatformArgs_2011_4_0_0 self);
haskellPlatformArgs_2011_2_0_1 = self : {
inherit (self) cabal ghc;
cgi = self.cgi_3001_1_7_4;
fgl = self.fgl_5_4_2_3;
GLUT = self.GLUT_2_1_2_1;
@ -370,7 +360,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
(self.haskellPlatformArgs_2011_2_0_1 self);
haskellPlatformArgs_2011_2_0_0 = self : {
inherit (self) cabal ghc;
cgi = self.cgi_3001_1_7_4;
fgl = self.fgl_5_4_2_3;
GLUT = self.GLUT_2_1_2_1;
@ -405,7 +394,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
(self.haskellPlatformArgs_2011_2_0_0 self);
haskellPlatformArgs_2010_2_0_0 = self : {
inherit (self) cabal ghc;
cgi = self.cgi_3001_1_7_3;
fgl = self.fgl_5_4_2_3;
GLUT = self.GLUT_2_1_2_1;
@ -437,7 +425,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
(self.haskellPlatformArgs_2010_2_0_0 self);
haskellPlatformArgs_2010_1_0_0 = self : {
inherit (self) cabal ghc;
haskellSrc = self.haskellSrc_1_0_1_3;
html = self.html_1_0_1_2;
fgl = self.fgl_5_4_2_2;
@ -467,7 +454,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
(self.haskellPlatformArgs_2010_1_0_0 self);
haskellPlatformArgs_2009_2_0_2 = self : {
inherit (self) cabal ghc;
time = self.time_1_1_2_4;
haddock = self.haddock_2_4_2;
cgi = self.cgi_3001_1_7_1;
@ -3171,6 +3157,4 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
# End of the main part of the file.
};
in result.finalReturn
}