about summary refs log tree commit diff
path: root/pkgs/stdenv/linux
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2012-12-28 20:14:01 +0000
committerLluís Batlle i Rossell <viric@viric.name>2012-12-28 20:14:01 +0000
commit719ba63004b54d67b3c0362efe02568acb42965c (patch)
tree391603fa3aafed335ef93f999e630a0d7a4850cb /pkgs/stdenv/linux
parentf2f50c42d2c705dc59465c070f5259a4ad00cf4c (diff)
parent88b11196c130b6bda5fd2e57729e876527c63377 (diff)
downloadnixlib-719ba63004b54d67b3c0362efe02568acb42965c.tar
nixlib-719ba63004b54d67b3c0362efe02568acb42965c.tar.gz
nixlib-719ba63004b54d67b3c0362efe02568acb42965c.tar.bz2
nixlib-719ba63004b54d67b3c0362efe02568acb42965c.tar.lz
nixlib-719ba63004b54d67b3c0362efe02568acb42965c.tar.xz
nixlib-719ba63004b54d67b3c0362efe02568acb42965c.tar.zst
nixlib-719ba63004b54d67b3c0362efe02568acb42965c.zip
Merge branch 'stdenv-updates' into pi-stdenv-updates
Conflicts:
	pkgs/development/compilers/gcc/4.6/default.nix
	pkgs/development/compilers/gcc/4.7/default.nix

The 4.7 had some weird parameters added in crossAttrs; I've removed
them, but I don't understand where they come from.
Diffstat (limited to 'pkgs/stdenv/linux')
-rw-r--r--pkgs/stdenv/linux/default.nix55
1 files changed, 26 insertions, 29 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index bdf91e717cdf..aed775887486 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -7,7 +7,7 @@
 # The function defaults are for easy testing.
 { system ? builtins.currentSystem
 , allPackages ? import ../../top-level/all-packages.nix
-, platform ? null }:
+, platform ? null, config }:
 
 rec {
 
@@ -33,11 +33,11 @@ rec {
 
   # The bootstrap process proceeds in several steps.
 
-  
+
   # 1) Create a standard environment by downloading pre-built binaries
   # of coreutils, GCC, etc.
 
-  
+
   # This function downloads a file.
   download = {url, sha256}: derivation {
     name = baseNameOf (toString url);
@@ -50,31 +50,31 @@ rec {
     impureEnvVars = [ "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy" ];
   };
 
-  
+
   # Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...).
   bootstrapTools = derivation {
     name = "bootstrap-tools";
-    
+
     builder = bootstrapFiles.sh;
-    
+
     args =
       if (system == "armv5tel-linux" || system == "armv6l-linux")
       then [ ./scripts/unpack-bootstrap-tools-arm.sh ]
       else [ ./scripts/unpack-bootstrap-tools.sh ];
-    
+
     inherit (bootstrapFiles) bzip2 mkdir curl cpio;
-    
+
     tarball = download {
       inherit (bootstrapFiles.bootstrapTools) url sha256;
     };
-    
+
     inherit system;
-    
+
     # Needed by the GCC wrapper.
     langC = true;
     langCC = true;
   };
-  
+
 
   # This function builds the various standard environments used during
   # the bootstrap.
@@ -82,7 +82,7 @@ rec {
     {gcc, extraAttrs ? {}, overrides ? (pkgs: {}), extraPath ? [], fetchurl}:
 
     import ../generic {
-      inherit system;
+      inherit system config;
       name = "stdenv-linux-boot";
       preHook =
         ''
@@ -95,7 +95,6 @@ rec {
       initialPath = [bootstrapTools] ++ extraPath;
       fetchurlBoot = fetchurl;
       inherit gcc;
-      withNixImpure = if platform ? nixImpure then platform.nixImpure else false;
       # Having the proper 'platform' in all the stdenvs allows getting proper
       # linuxHeaders for example.
       extraAttrs = extraAttrs // { inherit platform; };
@@ -111,7 +110,7 @@ rec {
     fetchurl = null;
   };
 
-  
+
   fetchurl = import ../../build-support/fetchurl {
     stdenv = stdenvLinuxBoot0;
     curl = bootstrapTools;
@@ -135,7 +134,7 @@ rec {
   # A helper function to call gcc-wrapper.
   wrapGCC =
     {gcc ? bootstrapTools, libc, binutils, coreutils, shell ? "", name ? "bootstrap-gcc-wrapper"}:
-    
+
     import ../../build-support/gcc-wrapper {
       nativeTools = false;
       nativeLibc = false;
@@ -155,7 +154,7 @@ rec {
     };
     inherit fetchurl;
   };
-  
+
 
   # 2) These are the packages that we can build with the first
   #    stdenv.  We only need binutils, because recent Glibcs
@@ -166,7 +165,7 @@ rec {
     bootStdenv = stdenvLinuxBoot1;
   };
 
-  
+
   # 3) 2nd stdenv that we will use to build only the glibc.
   stdenvLinuxBoot2 = stdenvBootFun {
     gcc = wrapGCC {
@@ -188,12 +187,12 @@ rec {
     bootStdenv = stdenvLinuxBoot2;
   };
 
-  
+
   # 5) Build Glibc with the bootstrap tools.  The result is the full,
   #    dynamically linked, final Glibc.
   stdenvLinuxGlibc = stdenvLinuxBoot2Pkgs.glibc;
 
-  
+
   # 6) Construct a third stdenv identical to the 2nd, except that
   #    this one uses the Glibc built in step 3.  It still uses
   #    the recent binutils and rest of the bootstrap tools, including GCC.
@@ -219,14 +218,14 @@ rec {
     inherit fetchurl;
   };
 
-  
+
   # 7) The packages that can be built using the third stdenv.
   stdenvLinuxBoot3Pkgs = allPackages {
     inherit system platform;
     bootStdenv = stdenvLinuxBoot3;
   };
 
-  
+
   # 8) Construct a fourth stdenv identical to the second, except that
   #    this one uses the dynamically linked GCC and Binutils from step
   #    5.  The other tools (e.g. coreutils) are still from the
@@ -247,14 +246,14 @@ rec {
     inherit fetchurl;
   };
 
-  
+
   # 9) The packages that can be built using the fourth stdenv.
   stdenvLinuxBoot4Pkgs = allPackages {
     inherit system platform;
     bootStdenv = stdenvLinuxBoot4;
   };
 
-  
+
   # 10) Construct the final stdenv.  It uses the Glibc, GCC and
   #     Binutils built above, and adds in dynamically linked versions
   #     of all other tools.
@@ -263,11 +262,11 @@ rec {
   #     dependency (`nix-store -qR') on bootstrapTools or the
   #     first binutils built.
   stdenvLinux = import ../generic rec {
-    inherit system;
-    
+    inherit system config;
+
     preHook = commonPreHook;
 
-    initialPath = 
+    initialPath =
       ((import ../common-path.nix) {pkgs = stdenvLinuxBoot4Pkgs;})
       ++ [stdenvLinuxBoot4Pkgs.patchelf];
 
@@ -281,11 +280,9 @@ rec {
     };
 
     shell = stdenvLinuxBoot4Pkgs.bash + "/bin/bash";
-    
+
     fetchurlBoot = fetchurl;
 
-    withNixImpure = if platform ? nixImpure then platform.nixImpure else false;
-    
     extraAttrs = {
       inherit (stdenvLinuxBoot3Pkgs) glibc;
       inherit platform;