Author: andres
Date: Mon Nov 15 20:28:42 2010
New Revision: 24701
URL: https://svn.nixos.org/websvn/nix/?rev=24701&sc=1

Log:
Trying to fix priorities of various GHC/Haskell package versions.

Modified:
   nixpkgs/trunk/pkgs/top-level/all-packages.nix
   nixpkgs/trunk/pkgs/top-level/haskell-packages.nix

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Mon Nov 15 20:28:21 
2010        (r24700)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Mon Nov 15 20:28:42 
2010        (r24701)
@@ -1820,8 +1820,8 @@
   # reducing the number or "enabled" versions again.
 
   # Helper functions to abstract away from repetitive instantiations.
-  haskellPackagesFun = ghcPath : profDefault : recurseIntoAttrs (import 
./haskell-packages.nix {
-    inherit pkgs newScope;
+  haskellPackagesFun = ghcPath : profDefault : modifyPrio : recurseIntoAttrs 
(import ./haskell-packages.nix {
+    inherit pkgs newScope modifyPrio;
     enableLibraryProfiling = getConfig [ "cabal" "libraryProfiling" ] 
profDefault;
     ghc = callPackage ghcPath {
       ghc = ghc6101Binary;    };
@@ -1829,32 +1829,32 @@
 
   # Currently active GHC versions.
   haskellPackages_ghc6101 =
-    haskellPackagesFun ../development/compilers/ghc/6.10.1.nix false;
+    haskellPackagesFun ../development/compilers/ghc/6.10.1.nix false (x : x);
 
   haskellPackages_ghc6102 =
-    haskellPackagesFun ../development/compilers/ghc/6.10.2.nix false;
+    haskellPackagesFun ../development/compilers/ghc/6.10.2.nix false (x : x);
 
   haskellPackages_ghc6103 =
-    haskellPackagesFun ../development/compilers/ghc/6.10.3.nix false;
+    haskellPackagesFun ../development/compilers/ghc/6.10.3.nix false (x : x);
 
   haskellPackages_ghc6104 =
-    haskellPackagesFun ../development/compilers/ghc/6.10.4.nix false;
+    haskellPackagesFun ../development/compilers/ghc/6.10.4.nix false (x : x);
 
   haskellPackages_ghc6121 =
-    haskellPackagesFun ../development/compilers/ghc/6.12.1.nix false;
+    haskellPackagesFun ../development/compilers/ghc/6.12.1.nix false (x : x);
 
   haskellPackages_ghc6122 =
-    haskellPackagesFun ../development/compilers/ghc/6.12.2.nix false;
+    haskellPackagesFun ../development/compilers/ghc/6.12.2.nix false (x : x);
 
   # Current default version.
   haskellPackages_ghc6123 =
-    haskellPackagesFun ../development/compilers/ghc/6.12.3.nix false;
+    haskellPackagesFun ../development/compilers/ghc/6.12.3.nix false (x : x);
 
   haskellPackages_ghc701 =
-    lowPrio (haskellPackagesFun ../development/compilers/ghc/7.0.1.nix false);
+    haskellPackagesFun ../development/compilers/ghc/7.0.1.nix  false lowPrio;
 
   haskellPackages_ghcHEAD =
-    lowPrio (haskellPackagesFun ../development/compilers/ghc/head.nix false);
+    haskellPackagesFun ../development/compilers/ghc/head.nix   false lowPrio;
 
   haxeDist = import ../development/compilers/haxe {
     inherit fetchurl sourceFromHead stdenv lib ocaml zlib makeWrapper neko;

Modified: nixpkgs/trunk/pkgs/top-level/haskell-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/haskell-packages.nix   Mon Nov 15 20:28:21 
2010        (r24700)
+++ nixpkgs/trunk/pkgs/top-level/haskell-packages.nix   Mon Nov 15 20:28:42 
2010        (r24701)
@@ -1,8 +1,12 @@
-{pkgs, newScope, ghc, enableLibraryProfiling ? false}:
+{pkgs, newScope, ghc, enableLibraryProfiling ? false, modifyPrio ? (x : x)}:
 
-let ghcReal = pkgs.lowPrio ghc; in
+let ghcOuter = ghc; in
 
-let result = let callPackage = newScope result; in
+# We redefine callPackage to take into account the new scope. The optional
+# modifyPrio argument can be set to lowPrio to make all Haskell packages have
+# low priority.
+
+let result = let callPackage = x : y : modifyPrio (newScope result x y); in
 
 # Indentation deliberately broken at this point to keep the bulk
 # of this file at a low indentation level.
@@ -13,14 +17,14 @@
   # -> http://github.com/MarcWeber/hack-nix. Read its README file.
   # You can install (almost) all packages from hackage easily.
 
-  inherit ghcReal;
+  ghcReal = pkgs.lowPrio ghcOuter;
 
   # In the remainder, `ghc' refers to the wrapper.  This is because
   # it's never useful to use the wrapped GHC (`ghcReal'), as the
   # wrapper provides essential functionality: the ability to find
   # Haskell packages in the buildInputs automatically.
   ghc = callPackage ../development/compilers/ghc/wrapper.nix {
-    ghc = ghcReal;
+    ghc = ghcOuter;
   };
 
   cabal = callPackage ../development/libraries/haskell/cabal/cabal.nix {};
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to