3
0
Fork 0
forked from mirrors/nixpkgs

Changing the way haskellPackagesFun is invoked.

This is supposed to make it easier to create locally modified
version preferences in Haskell package sets, by using override
on the extraPrefs attribute.

svn path=/nixpkgs/trunk/; revision=34031
This commit is contained in:
Andres Löh 2012-05-09 16:20:01 +00:00
parent aa6e1f4586
commit 262c2a45b0

View file

@ -2214,47 +2214,61 @@ let
# So we enable it for selected versions only. # So we enable it for selected versions only.
# Helper functions to abstract away from repetitive instantiations. # Helper functions to abstract away from repetitive instantiations.
haskellPackagesFun = haskellPackagesFun = makeOverridable
ghcPath : ghcBinary : prefFun : profExplicit : profDefault : modifyPrio : ({ ghcPath
, ghcBinary ? ghc6101Binary
, prefFun
, extraPrefs ? (x : {})
, profExplicit ? false, profDefault ? false
, modifyPrio ? lowPrio
} :
import ./haskell-packages.nix { import ./haskell-packages.nix {
inherit pkgs newScope modifyPrio prefFun; inherit pkgs newScope modifyPrio;
prefFun = self : super : prefFun self super // extraPrefs super;
enableLibraryProfiling = enableLibraryProfiling =
if profExplicit then profDefault if profExplicit then profDefault
else getConfig [ "cabal" "libraryProfiling" ] profDefault; else getConfig [ "cabal" "libraryProfiling" ] profDefault;
ghc = callPackage ghcPath { ghc = ghcBinary; }; ghc = callPackage ghcPath { ghc = ghcBinary; };
}; });
# Currently active GHC versions. # Currently active GHC versions.
haskellPackages_ghc6104 = haskellPackages_ghc6104 =
recurseIntoAttrs recurseIntoAttrs
(haskellPackagesFun ../development/compilers/ghc/6.10.4.nix (haskellPackagesFun { ghcPath = ../development/compilers/ghc/6.10.4.nix;
ghc6101Binary (x : x.ghc6104Prefs) false false lowPrio); prefFun = x : x.ghc6104Prefs;
});
haskellPackages_ghc6121 = haskellPackages_ghc6121 =
haskellPackagesFun ../development/compilers/ghc/6.12.1.nix haskellPackagesFun { ghcPath = ../development/compilers/ghc/6.12.1.nix;
ghc6101Binary (x : x.ghc6121Prefs) false false lowPrio; prefFun = x : x.ghc6121Prefs;
};
haskellPackages_ghc6122 = haskellPackages_ghc6122 =
haskellPackagesFun ../development/compilers/ghc/6.12.2.nix haskellPackagesFun { ghcPath = ../development/compilers/ghc/6.12.2.nix;
ghc6101Binary (x : x.ghc6122Prefs) false false lowPrio; prefFun = x : x.ghc6122Prefs;
};
haskellPackages_ghc6123 = haskellPackages_ghc6123 =
recurseIntoAttrs recurseIntoAttrs
(haskellPackagesFun ../development/compilers/ghc/6.12.3.nix (haskellPackagesFun { ghcPath = ../development/compilers/ghc/6.12.3.nix;
ghc6101Binary (x : x.ghc6123Prefs) false false lowPrio); prefFun = x : x.ghc6123Prefs;
});
# Will never make it into a platform release, severe bugs; leave at lowPrio. # Will never make it into a platform release, severe bugs; leave at lowPrio.
haskellPackages_ghc701 = haskellPackages_ghc701 =
haskellPackagesFun ../development/compilers/ghc/7.0.1.nix haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.0.1.nix;
ghc6101Binary (x : x.ghc701Prefs) false false lowPrio; prefFun = x : x.ghc701Prefs;
};
haskellPackages_ghc702 = haskellPackages_ghc702 =
haskellPackagesFun ../development/compilers/ghc/7.0.2.nix haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.0.2.nix;
ghc6101Binary (x : x.ghc702Prefs) false false lowPrio; prefFun = x : x.ghc702Prefs;
};
haskellPackages_ghc703 = haskellPackages_ghc703 =
haskellPackagesFun ../development/compilers/ghc/7.0.3.nix haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.0.3.nix;
ghc6101Binary (x : x.ghc703Prefs) false false lowPrio; prefFun = x : x.ghc703Prefs;
};
# Current default version: 7.0.4. # Current default version: 7.0.4.
# #
@ -2281,53 +2295,65 @@ let
haskellPackages_ghc704_no_profiling = haskellPackages_ghc704_no_profiling =
recurseIntoAttrs recurseIntoAttrs
(haskellPackagesFun ../development/compilers/ghc/7.0.4.nix (haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.0.4.nix;
(if stdenv.isDarwin then ghc704Binary else ghc6101Binary) ghcBinary = if stdenv.isDarwin then ghc704Binary else ghc6101Binary;
(x : x.ghc704Prefs) true false prefFun = x : x.ghc704Prefs;
(haskellDefaultVersionPrioFun false)); profExplicit = true;
modifyPrio = haskellDefaultVersionPrioFun false;
});
haskellPackages_ghc704_profiling = haskellPackages_ghc704_profiling =
recurseIntoAttrs recurseIntoAttrs
(haskellPackagesFun ../development/compilers/ghc/7.0.4.nix (haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.0.4.nix;
(if stdenv.isDarwin then ghc704Binary else ghc6101Binary) ghcBinary = if stdenv.isDarwin then ghc704Binary else ghc6101Binary;
(x : x.ghc704Prefs) true true prefFun = x : x.ghc704Prefs;
(haskellDefaultVersionPrioFun true)); profExplicit = true;
profDefault = true;
modifyPrio = haskellDefaultVersionPrioFun true;
});
haskellPackages_ghc704 = haskellPackages_ghc704 =
haskellPackagesFun ../development/compilers/ghc/7.0.4.nix haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.0.4.nix;
(if stdenv.isDarwin then ghc704Binary else ghc6101Binary) ghcBinary = if stdenv.isDarwin then ghc704Binary else ghc6101Binary;
(x : x.ghc704Prefs) false false (x : x); prefFun = x : x.ghc704Prefs;
modifyPrio = x : x;
};
haskellPackages_ghc721 = haskellPackages_ghc721 =
haskellPackagesFun ../development/compilers/ghc/7.2.1.nix haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.2.1.nix;
(if stdenv.isDarwin then ghc704Binary else ghc6121Binary) ghcBinary = if stdenv.isDarwin then ghc704Binary else ghc6121Binary;
(x : x.ghc721Prefs) false false lowPrio; prefFun = x : x.ghc721Prefs;
};
haskellPackages_ghc722 = haskellPackages_ghc722 =
haskellPackagesFun ../development/compilers/ghc/7.2.2.nix haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.2.2.nix;
(if stdenv.isDarwin then ghc704Binary else ghc6121Binary) ghcBinary = if stdenv.isDarwin then ghc704Binary else ghc6121Binary;
(x : x.ghc722Prefs) false false lowPrio; prefFun = x : x.ghc722Prefs;
};
haskellPackages_ghc741 = haskellPackages_ghc741 =
recurseIntoAttrs recurseIntoAttrs
(haskellPackagesFun ../development/compilers/ghc/7.4.1.nix (haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.4.1.nix;
(if stdenv.isDarwin then ghc704Binary else ghc6121Binary) ghcBinary = if stdenv.isDarwin then ghc704Binary else ghc6121Binary;
(x : x.ghc741Prefs) false false lowPrio); prefFun = x : x.ghc741Prefs;
});
# Stable branch snapshot. # Stable branch snapshot.
haskellPackages_ghc742 = haskellPackages_ghc742 =
recurseIntoAttrs recurseIntoAttrs
(haskellPackagesFun ../development/compilers/ghc/7.4.2.nix (haskellPackagesFun { ghcPath = ../development/compilers/ghc/7.4.2.nix;
(if stdenv.isDarwin then ghc704Binary else ghc6121Binary) ghcBinary = if stdenv.isDarwin then ghc704Binary else ghc6121Binary;
(x : x.ghcHEADPrefs) false false lowPrio); prefFun = x : x.ghcHEADPrefs;
});
# Reasonably current HEAD snapshot. Should *always* be lowPrio. # Reasonably current HEAD snapshot. Should *always* be lowPrio.
haskellPackages_ghcHEAD = haskellPackages_ghcHEAD =
recurseIntoAttrs recurseIntoAttrs
(haskellPackagesFun ../development/compilers/ghc/head.nix (haskellPackagesFun { ghcPath = ../development/compilers/ghc/head.nix;
# (haskellPackages_ghc704.ghcWithPackages (self : [ self.alex self.happy ])) ghcBinary = # (haskellPackages_ghc704.ghcWithPackages (self : [ self.alex self.happy ]))
ghc704Binary ghc704Binary;
(x : x.ghcHEADPrefs) false false lowPrio); prefFun = x : x.ghcHEADPrefs;
});
haxeDist = import ../development/compilers/haxe { haxeDist = import ../development/compilers/haxe {
inherit fetchurl sourceFromHead stdenv lib ocaml zlib makeWrapper neko; inherit fetchurl sourceFromHead stdenv lib ocaml zlib makeWrapper neko;