about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-08-17 11:35:49 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-08-17 11:35:49 +0000
commited5011cc02053fd4b2adeb831f658ca0cd046944 (patch)
tree8249f5ae852d9975212b0bbff38fee81bbda032f
parentf99f1bc055a17812dcb94caf761af03a08a6a0d8 (diff)
downloadnixlib-ed5011cc02053fd4b2adeb831f658ca0cd046944.tar
nixlib-ed5011cc02053fd4b2adeb831f658ca0cd046944.tar.gz
nixlib-ed5011cc02053fd4b2adeb831f658ca0cd046944.tar.bz2
nixlib-ed5011cc02053fd4b2adeb831f658ca0cd046944.tar.lz
nixlib-ed5011cc02053fd4b2adeb831f658ca0cd046944.tar.xz
nixlib-ed5011cc02053fd4b2adeb831f658ca0cd046944.tar.zst
nixlib-ed5011cc02053fd4b2adeb831f658ca0cd046944.zip
* Make sure that in an override like:
    python = pkgs.python27Full;
    pythonBase = pkgs.python27Base;

  a build of (say) Firefox doesn't depend on python26 as well as
  python27.  This happens because python27Full has this line:

    inherit (xlibs) libX11 xproto;

  which causes python27Full to use libX11 from pkgsOrig, where the
  override hasn't been applied.  The solution is to change it to
  
    inherit (pkgs.xlibs) libX11 xproto;

  In the future, to prevent this, we should make all-packages.nix a
  non-rec set and require all package references to explicitly go
  through pkgs.<attr>.  (Then we can also drop the ugly __overrides
  language "feature".)

svn path=/nixpkgs/trunk/; revision=23203
-rw-r--r--pkgs/top-level/all-packages.nix24
1 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 186c791385b5..b9c9067a742e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -97,10 +97,10 @@ let
   # otherwise the basic overrided packages will not be built with the
   # crossStdenv adapter.
   overrides = (getConfig ["packageOverrides"] (pkgs: {})) pkgsOrig //
-    (if (pkgsOrig.stdenv ? overrides && crossSystem == null)
-    then pkgsOrig.stdenv.overrides else { });
+    (if pkgsOrig.stdenv ? overrides && crossSystem == null
+     then pkgsOrig.stdenv.overrides else { });
 
-  pkgsOrig = pkgsFun {}; # the un-overriden packages, passed to packageOverrides
+  pkgsOrig = pkgsFun { }; # the un-overriden packages, passed to packageOverrides
   pkgs = pkgsFun overrides; # the overriden, final packages
 
 
@@ -2122,18 +2122,18 @@ let
   });
 
   python27Base = lowPrio (makeOverridable (import ../development/interpreters/python/2.7) {
-    inherit fetchurl stdenv zlib bzip2 gdbm;
+    inherit (pkgs) fetchurl stdenv zlib bzip2 gdbm;
     arch = if stdenv.isDarwin then darwinArchUtility else null;
     sw_vers = if stdenv.isDarwin then darwinSwVersUtility else null;
   });
 
   python27Full = lowPrio (python27Base.override {
-    inherit db4 sqlite readline openssl tcl tk ncurses;
-    inherit (xlibs) libX11 xproto;
+    inherit (pkgs) db4 sqlite readline openssl tcl tk ncurses;
+    inherit (pkgs.xlibs) libX11 xproto;
   });
 
   python31Base = lowPrio (makeOverridable (import ../development/interpreters/python/3.1) {
-    inherit fetchurl stdenv zlib bzip2 gdbm;
+    inherit (pkgs) fetchurl stdenv zlib bzip2 gdbm;
     arch = if stdenv.isDarwin then darwinArchUtility else null;
     sw_vers = if stdenv.isDarwin then darwinSwVersUtility else null;
   });
@@ -4201,11 +4201,11 @@ let
       xkeyboard_config dbus hal libuuid openssl gperf m4
       automake autoconf libtool xmlto asciidoc udev;
 
-    # !!! pythonBase is use instead of python because this cause an infinite
-    # !!! recursion when the flag python.full is set to true.  Packages
-    # !!! contained in the loop are python, tk, xlibs-wrapper, libX11,
-    # !!! libxcd (and xcb-proto).
-    python =  pythonBase;
+    # !!! pythonBase is used instead of python because this causes an
+    # infinite recursion when the flag python.full is set to true.
+    # Packages contained in the loop are python, tk, xlibs-wrapper,
+    # libX11, libxcd (and xcb-proto).
+    python = pythonBase;
   });
 
   xorgReplacements = callPackage ../servers/x11/xorg/replacements.nix { };