about summary refs log tree commit diff
path: root/pkgs/stdenv/linux
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-08-21 21:08:57 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-08-21 21:08:57 +0000
commitdc19818cc75f6905de651dc559158ba5ef1eab9f (patch)
tree5fec2c232b4e9639d7f6a44e30406aa5a1be2842 /pkgs/stdenv/linux
parent9a1e29ecdfcce8735703a2d65d8b87461b7d86f2 (diff)
downloadnixlib-dc19818cc75f6905de651dc559158ba5ef1eab9f.tar
nixlib-dc19818cc75f6905de651dc559158ba5ef1eab9f.tar.gz
nixlib-dc19818cc75f6905de651dc559158ba5ef1eab9f.tar.bz2
nixlib-dc19818cc75f6905de651dc559158ba5ef1eab9f.tar.lz
nixlib-dc19818cc75f6905de651dc559158ba5ef1eab9f.tar.xz
nixlib-dc19818cc75f6905de651dc559158ba5ef1eab9f.tar.zst
nixlib-dc19818cc75f6905de651dc559158ba5ef1eab9f.zip
Propagating the 'platform' stdenv attribute properly on stdenvLinux,
so it can be used in places like the linuxHeaders expression.

svn path=/nixpkgs/branches/stdenv-updates/; revision=23343
Diffstat (limited to 'pkgs/stdenv/linux')
-rw-r--r--pkgs/stdenv/linux/default.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 04009fd5bee6..5654a8ccaf58 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -5,7 +5,7 @@
 # ensuring purity of components produced by it.
 
 # The function defaults are for easy testing.
-{system ? "i686-linux", allPackages ? import ../../top-level/all-packages.nix}:
+{system ? "i686-linux", allPackages ? import ../../top-level/all-packages.nix, platform}:
 
 rec {
 
@@ -91,7 +91,10 @@ rec {
       shell = "${bootstrapTools}/bin/sh";
       initialPath = [bootstrapTools] ++ extraPath;
       fetchurlBoot = fetchurl;
-      inherit gcc extraAttrs;
+      inherit gcc;
+      # Having the proper 'platform' in all the stdenvs allows getting proper
+      # linuxHeaders for example.
+      extraAttrs = extraAttrs // { inherit platform; };
       overrides = overrides // {
         inherit fetchurl;
       };
@@ -153,7 +156,7 @@ rec {
   # 2) These are the packages that we can build with the first
   #    stdenv.  We only need Glibc (in step 3).
   stdenvLinuxBoot1Pkgs = allPackages {
-    inherit system;
+    inherit system platform;
     bootStdenv = stdenvLinuxBoot1;
   };
 
@@ -182,7 +185,7 @@ rec {
   
   # 5) The packages that can be built using the second stdenv.
   stdenvLinuxBoot2Pkgs = allPackages {
-    inherit system;
+    inherit system platform;
     bootStdenv = stdenvLinuxBoot2;
   };
 
@@ -220,7 +223,7 @@ rec {
   
   # 7) The packages that can be built using the third stdenv.
   stdenvLinuxBoot3Pkgs = allPackages {
-    inherit system;
+    inherit system platform;
     bootStdenv = stdenvLinuxBoot3;
   };
 
@@ -257,6 +260,7 @@ rec {
     
     extraAttrs = {
       inherit (stdenvLinuxBoot2Pkgs) glibc;
+      inherit platform;
     };
 
     overrides = {