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
This commit is contained in:
parent
9a1e29ecdf
commit
dc19818cc7
|
@ -10,7 +10,7 @@
|
||||||
# system, e.g., cygwin and mingw builds on i686-cygwin. Most people
|
# system, e.g., cygwin and mingw builds on i686-cygwin. Most people
|
||||||
# can ignore it.
|
# can ignore it.
|
||||||
|
|
||||||
{system, stdenvType ? system, allPackages ? import ../..}:
|
{system, stdenvType ? system, allPackages ? import ../.., platform}:
|
||||||
|
|
||||||
assert system != "i686-cygwin" -> system == stdenvType;
|
assert system != "i686-cygwin" -> system == stdenvType;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ rec {
|
||||||
|
|
||||||
|
|
||||||
# Linux standard environment.
|
# Linux standard environment.
|
||||||
stdenvLinux = (import ./linux {inherit system allPackages;}).stdenvLinux;
|
stdenvLinux = (import ./linux {inherit system allPackages platform;}).stdenvLinux;
|
||||||
|
|
||||||
|
|
||||||
# MinGW/MSYS standard environment.
|
# MinGW/MSYS standard environment.
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# ensuring purity of components produced by it.
|
# ensuring purity of components produced by it.
|
||||||
|
|
||||||
# The function defaults are for easy testing.
|
# 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 {
|
rec {
|
||||||
|
|
||||||
|
@ -91,7 +91,10 @@ rec {
|
||||||
shell = "${bootstrapTools}/bin/sh";
|
shell = "${bootstrapTools}/bin/sh";
|
||||||
initialPath = [bootstrapTools] ++ extraPath;
|
initialPath = [bootstrapTools] ++ extraPath;
|
||||||
fetchurlBoot = fetchurl;
|
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 // {
|
overrides = overrides // {
|
||||||
inherit fetchurl;
|
inherit fetchurl;
|
||||||
};
|
};
|
||||||
|
@ -153,7 +156,7 @@ rec {
|
||||||
# 2) These are the packages that we can build with the first
|
# 2) These are the packages that we can build with the first
|
||||||
# stdenv. We only need Glibc (in step 3).
|
# stdenv. We only need Glibc (in step 3).
|
||||||
stdenvLinuxBoot1Pkgs = allPackages {
|
stdenvLinuxBoot1Pkgs = allPackages {
|
||||||
inherit system;
|
inherit system platform;
|
||||||
bootStdenv = stdenvLinuxBoot1;
|
bootStdenv = stdenvLinuxBoot1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -182,7 +185,7 @@ rec {
|
||||||
|
|
||||||
# 5) The packages that can be built using the second stdenv.
|
# 5) The packages that can be built using the second stdenv.
|
||||||
stdenvLinuxBoot2Pkgs = allPackages {
|
stdenvLinuxBoot2Pkgs = allPackages {
|
||||||
inherit system;
|
inherit system platform;
|
||||||
bootStdenv = stdenvLinuxBoot2;
|
bootStdenv = stdenvLinuxBoot2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -220,7 +223,7 @@ rec {
|
||||||
|
|
||||||
# 7) The packages that can be built using the third stdenv.
|
# 7) The packages that can be built using the third stdenv.
|
||||||
stdenvLinuxBoot3Pkgs = allPackages {
|
stdenvLinuxBoot3Pkgs = allPackages {
|
||||||
inherit system;
|
inherit system platform;
|
||||||
bootStdenv = stdenvLinuxBoot3;
|
bootStdenv = stdenvLinuxBoot3;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -257,6 +260,7 @@ rec {
|
||||||
|
|
||||||
extraAttrs = {
|
extraAttrs = {
|
||||||
inherit (stdenvLinuxBoot2Pkgs) glibc;
|
inherit (stdenvLinuxBoot2Pkgs) glibc;
|
||||||
|
inherit platform;
|
||||||
};
|
};
|
||||||
|
|
||||||
overrides = {
|
overrides = {
|
||||||
|
|
|
@ -177,7 +177,7 @@ let
|
||||||
|
|
||||||
|
|
||||||
allStdenvs = import ../stdenv {
|
allStdenvs = import ../stdenv {
|
||||||
inherit system stdenvType;
|
inherit system stdenvType platform;
|
||||||
allPackages = args: import ./all-packages.nix ({ inherit config; } // args);
|
allPackages = args: import ./all-packages.nix ({ inherit config; } // args);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue