haskell-ng: enable package sets for GHC 6.12.3, 7.0.4, 7.2.2, and 7.4.2

This commit is contained in:
Peter Simons 2015-01-16 21:48:59 +01:00
parent d1fc5370e9
commit e6ecb1fb83
6 changed files with 240 additions and 6 deletions

View File

@ -0,0 +1,60 @@
{ pkgs }:
with import ./lib.nix { inherit pkgs; };
self: super: {
# Disable GHC 6.12.x core libraries.
array = null;
base = null;
bin-package-db = null;
bytestring = null;
Cabal = null;
containers = null;
directory = null;
dph-base = null;
dph-par = null;
dph-prim-interface = null;
dph-prim-par = null;
dph-prim-seq = null;
dph-seq = null;
extensible-exceptions = null;
ffi = null;
filepath = null;
ghc-binary = null;
ghc-prim = null;
haskell98 = null;
hpc = null;
integer-gmp = null;
old-locale = null;
old-time = null;
pretty = null;
process = null;
random = null;
rts = null;
syb = null;
template-haskell = null;
time = null;
unix = null;
# binary is not a core library for this compiler.
binary = self.binary_0_7_2_3;
# deepseq is not a core library for this compiler.
deepseq = self.deepseq_1_4_0_0;
# transformers is not a core library for this compiler.
transformers = self.transformers_0_4_2_0;
mtl = self.mtl_2_2_1;
transformers-compat = disableCabalFlag super.transformers-compat "three";
# https://github.com/tibbe/hashable/issues/85
hashable = dontCheck super.hashable;
# Needs Cabal >= 1.18.x.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_1_18_1_6; };
# Haddock chokes on the prologue from the cabal file.
ChasingBottoms = dontHaddock super.ChasingBottoms;
}

View File

@ -0,0 +1,54 @@
{ pkgs }:
with import ./lib.nix { inherit pkgs; };
self: super: {
# Disable GHC 7.0.x core libraries.
array = null;
base = null;
bin-package-db = null;
bytestring = null;
Cabal = null;
containers = null;
directory = null;
extensible-exceptions = null;
ffi = null;
filepath = null;
ghc-binary = null;
ghc-prim = null;
haskell2010 = null;
haskell98 = null;
hpc = null;
integer-gmp = null;
old-locale = null;
old-time = null;
pretty = null;
process = null;
random = null;
rts = null;
template-haskell = null;
time = null;
unix = null;
# binary is not a core library for this compiler.
binary = self.binary_0_7_2_3;
# deepseq is not a core library for this compiler.
deepseq = self.deepseq_1_4_0_0;
# transformers is not a core library for this compiler.
transformers = self.transformers_0_4_2_0;
mtl = self.mtl_2_2_1;
transformers-compat = disableCabalFlag super.transformers-compat "three";
# https://github.com/tibbe/hashable/issues/85
hashable = dontCheck super.hashable;
# Needs Cabal >= 1.18.x.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_1_18_1_6; };
# Haddock chokes on the prologue from the cabal file.
ChasingBottoms = dontHaddock super.ChasingBottoms;
}

View File

@ -0,0 +1,54 @@
{ pkgs }:
with import ./lib.nix { inherit pkgs; };
self: super: {
# Disable GHC 7.2.x core libraries.
array = null;
base = null;
binary = null;
bin-package-db = null;
bytestring = null;
Cabal = null;
containers = null;
directory = null;
extensible-exceptions = null;
ffi = null;
filepath = null;
ghc-prim = null;
haskell2010 = null;
haskell98 = null;
hoopl = null;
hpc = null;
integer-gmp = null;
old-locale = null;
old-time = null;
pretty = null;
process = null;
rts = null;
template-haskell = null;
time = null;
unix = null;
# deepseq is not a core library for this compiler.
deepseq = self.deepseq_1_4_0_0;
# transformers is not a core library for this compiler.
transformers = self.transformers_0_4_2_0;
mtl = self.mtl_2_2_1;
transformers-compat = disableCabalFlag super.transformers-compat "three";
# https://github.com/haskell/cabal/issues/2322
Cabal_1_22_0_0 = super.Cabal_1_22_0_0.override { binary = self.binary_0_7_2_3; };
# https://github.com/tibbe/hashable/issues/85
hashable = dontCheck super.hashable;
# Needs Cabal >= 1.18.x.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_1_18_1_6; };
# Haddock chokes on the prologue from the cabal file.
ChasingBottoms = dontHaddock super.ChasingBottoms;
}

View File

@ -0,0 +1,51 @@
{ pkgs }:
with import ./lib.nix { inherit pkgs; };
self: super: {
# Disable GHC 7.4.x core libraries.
array = null;
base = null;
binary = null;
bin-package-db = null;
bytestring = null;
Cabal = null;
containers = null;
deepseq = null;
directory = null;
extensible-exceptions = null;
filepath = null;
ghc-prim = null;
haskell2010 = null;
haskell98 = null;
hoopl = null;
hpc = null;
integer-gmp = null;
old-locale = null;
old-time = null;
pretty = null;
process = null;
rts = null;
template-haskell = null;
time = null;
unix = null;
# transformers is not a core library for this compiler.
transformers = self.transformers_0_4_2_0;
mtl = self.mtl_2_2_1;
transformers-compat = disableCabalFlag super.transformers-compat "three";
# https://github.com/haskell/cabal/issues/2322
Cabal_1_22_0_0 = super.Cabal_1_22_0_0.override { binary = self.binary_0_7_2_3; };
# https://github.com/tibbe/hashable/issues/85
hashable = dontCheck super.hashable;
# Needs Cabal >= 1.18.x.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_1_18_1_6; };
# Haddock chokes on the prologue from the cabal file.
ChasingBottoms = dontHaddock super.ChasingBottoms;
}

View File

@ -55,6 +55,9 @@ let
main = defaultMain
'';
ghc76xOrLater = stdenv.lib.versionOlder "7.6" ghc.version;
packageDbFlag = if ghc76xOrLater then "package-db" else "package-conf";
defaultConfigureFlags = [
(enableFeature enableSplitObjs "split-objs")
(enableFeature enableLibraryProfiling "library-profiling")
@ -146,7 +149,7 @@ stdenv.mkDerivation ({
fi
done
done
ghc-pkg --package-db="$packageConfDir" recache
ghc-pkg --${packageDbFlag}="$packageConfDir" recache
configureFlags+=" --package-db=$packageConfDir"
${optionalString (editedCabalFile != null) ''
@ -162,7 +165,7 @@ stdenv.mkDerivation ({
for i in Setup.hs Setup.lhs ${defaultSetupHs}; do
test -f $i && break
done
ghc ${optionalString (! coreSetup) "-package-db=$packageConfDir "}$setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
ghc ${optionalString (! coreSetup) "-${packageDbFlag}=$packageConfDir "}$setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
echo configureFlags: $configureFlags
unset GHC_PACKAGE_PATH # Cabal complains if this variable is set during configure.

View File

@ -26,10 +26,22 @@ rec {
packages = {
ghc6104 = callPackage ../development/haskell-modules { ghc = compiler.ghc6104; };
ghc6123 = callPackage ../development/haskell-modules { ghc = compiler.ghc6123; };
ghc704 = callPackage ../development/haskell-modules { ghc = compiler.ghc704; };
ghc722 = callPackage ../development/haskell-modules { ghc = compiler.ghc722; };
ghc742 = callPackage ../development/haskell-modules { ghc = compiler.ghc742; };
ghc6123 = callPackage ../development/haskell-modules {
ghc = compiler.ghc6123;
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-6.12.x.nix { };
};
ghc704 = callPackage ../development/haskell-modules {
ghc = compiler.ghc704;
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-7.0.x.nix { };
};
ghc722 = callPackage ../development/haskell-modules {
ghc = compiler.ghc722;
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-7.2.x.nix { };
};
ghc742 = callPackage ../development/haskell-modules {
ghc = compiler.ghc742;
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-7.4.x.nix { };
};
ghc763 = callPackage ../development/haskell-modules {
ghc = compiler.ghc763;
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-7.6.x.nix { };