Author: viric
Date: Sat Jan 21 00:26:50 2012
New Revision: 31748
URL: https://nixos.org/websvn/nix/?rev=31748&sc=1

Log:
Fixing a typo. And letting stdenvCross be prioritary to the global override.

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

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Sat Jan 21 00:25:30 
2012        (r31747)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Sat Jan 21 00:26:50 
2012        (r31748)
@@ -204,19 +204,20 @@
 
   stdenv =
     if bootStdenv != null then (bootStdenv // {inherit platform;}) else
-      let
-          changer = getConfig ["replaceStdenv"] null;
-      in if changer != null then
-        changer {
-          # We import again all-packages to avoid recursivities.
-          pkgs = import ./all-packages.nix {
-            # We remove packageOverrides to avoid recursivities
-            config = removeAttrs config [ "replaceStdenv" ];
-          };
-        }
-      else if crossSystem != null then
+      if crossSystem != null then
         stdenvCross
       else
+        let
+            changer = getConfig ["replaceStdenv"] null;
+        in if changer != null then
+          changer {
+            # We import again all-packages to avoid recursivities.
+            pkgs = import ./all-packages.nix {
+              # We remove packageOverrides to avoid recursivities
+              config = removeAttrs config [ "replaceStdenv" ];
+            };
+          }
+      else
         defaultStdenv;
 
   forceBuildDrv = drv : if (crossSystem == null) then drv else
@@ -2894,7 +2895,7 @@
 
   # Wrapper that works as gcc or g++
   # It can be used by setting in nixpkgs config like this, for example:
-  #    replaceStdenv = { pkgs }: (pkgs.ccacheStdenv "/var/ccache")
+  #    replaceStdenv = { pkgs }: (pkgs.ccacheStdenv "/var/ccache");
   # But if you build in chroot, you should have that path in chroot
   ccacheWrapper = cacheDir: wrapGCC (ccache.links cacheDir);
   ccacheStdenv = cacheDir: overrideGCC stdenv (ccacheWrapper cacheDir);
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to