I still had an error in the stdenvLinux bootstrap; for the previous commit, I

had a little svn mess in the working directory that ended up in a not working
stdenvLinux.

This time I even chose better names for the attributes, so they match better
the comments.


svn path=/nixpkgs/branches/stdenv-updates/; revision=23428
This commit is contained in:
Lluís Batlle i Rossell 2010-08-25 19:15:16 +00:00
parent 0bfa3b030a
commit 0fa35eee66

View File

@ -165,7 +165,7 @@ rec {
firstBinutils = stdenvLinuxBoot1Pkgs.binutils; firstBinutils = stdenvLinuxBoot1Pkgs.binutils;
# 3) 2nd stdenv that we will use to build only the glibc. # 3) 2nd stdenv that we will use to build only the glibc.
stdenvLinuxBoot1half = stdenvBootFun { stdenvLinuxBoot2 = stdenvBootFun {
gcc = wrapGCC { gcc = wrapGCC {
libc = bootstrapGlibc; libc = bootstrapGlibc;
binutils = firstBinutils; binutils = firstBinutils;
@ -177,21 +177,21 @@ rec {
# 4) These are the packages that we can build with the 2nd # 4) These are the packages that we can build with the 2nd
# stdenv. We only need Glibc (in step 5). # stdenv. We only need Glibc (in step 5).
stdenvLinuxBoot1halfPkgs = allPackages { stdenvLinuxBoot2Pkgs = allPackages {
inherit system platform; inherit system platform;
bootStdenv = stdenvLinuxBoot1half; bootStdenv = stdenvLinuxBoot2;
}; };
# 5) Build Glibc with the bootstrap tools. The result is the full, # 5) Build Glibc with the bootstrap tools. The result is the full,
# dynamically linked, final Glibc. # dynamically linked, final Glibc.
stdenvLinuxGlibc = stdenvLinuxBoot1Pkgs.glibc; stdenvLinuxGlibc = stdenvLinuxBoot2Pkgs.glibc;
# 6) Construct a third stdenv identical to the 2nd, except that # 6) Construct a third stdenv identical to the 2nd, except that
# this one uses the Glibc built in step 3. It still uses # this one uses the Glibc built in step 3. It still uses
# the recent binutils and rest of the bootstrap tools, including GCC. # the recent binutils and rest of the bootstrap tools, including GCC.
stdenvLinuxBoot2 = removeAttrs (stdenvBootFun { stdenvLinuxBoot3 = removeAttrs (stdenvBootFun {
gcc = wrapGCC { gcc = wrapGCC {
binutils = stdenvLinuxBoot1Pkgs.binutils; binutils = stdenvLinuxBoot1Pkgs.binutils;
coreutils = bootstrapTools; coreutils = bootstrapTools;
@ -206,19 +206,19 @@ rec {
# 7) The packages that can be built using the third stdenv. # 7) The packages that can be built using the third stdenv.
stdenvLinuxBoot2Pkgs = allPackages { stdenvLinuxBoot3Pkgs = allPackages {
inherit system platform; inherit system platform;
bootStdenv = stdenvLinuxBoot2; bootStdenv = stdenvLinuxBoot3;
}; };
gccWithStaticLibs = stdenvLinuxBoot2Pkgs.gcc.gcc.override (rec { gccWithStaticLibs = stdenvLinuxBoot3Pkgs.gcc.gcc.override (rec {
ppl = stdenvLinuxBoot2Pkgs.ppl.override { ppl = stdenvLinuxBoot3Pkgs.ppl.override {
static = true; static = true;
gmpxx = stdenvLinuxBoot2Pkgs.gmpxx.override { gmpxx = stdenvLinuxBoot3Pkgs.gmpxx.override {
static = true; static = true;
}; };
}; };
cloogppl = stdenvLinuxBoot2Pkgs.cloogppl.override { cloogppl = stdenvLinuxBoot3Pkgs.cloogppl.override {
inherit ppl; inherit ppl;
static = true; static = true;
}; };
@ -228,9 +228,9 @@ rec {
# this one uses the dynamically linked GCC and Binutils from step # this one uses the dynamically linked GCC and Binutils from step
# 5. The other tools (e.g. coreutils) are still from the # 5. The other tools (e.g. coreutils) are still from the
# bootstrap tools. # bootstrap tools.
stdenvLinuxBoot3 = stdenvBootFun { stdenvLinuxBoot4 = stdenvBootFun {
gcc = wrapGCC rec { gcc = wrapGCC rec {
inherit (stdenvLinuxBoot2Pkgs) binutils; inherit (stdenvLinuxBoot3Pkgs) binutils;
coreutils = bootstrapTools; coreutils = bootstrapTools;
libc = stdenvLinuxGlibc; libc = stdenvLinuxGlibc;
gcc = gccWithStaticLibs; gcc = gccWithStaticLibs;
@ -244,9 +244,9 @@ rec {
# 9) The packages that can be built using the fourth stdenv. # 9) The packages that can be built using the fourth stdenv.
stdenvLinuxBoot3Pkgs = allPackages { stdenvLinuxBoot4Pkgs = allPackages {
inherit system platform; inherit system platform;
bootStdenv = stdenvLinuxBoot3; bootStdenv = stdenvLinuxBoot4;
}; };
@ -265,31 +265,31 @@ rec {
preHook = builtins.toFile "prehook.sh" commonPreHook; preHook = builtins.toFile "prehook.sh" commonPreHook;
initialPath = initialPath =
((import ../common-path.nix) {pkgs = stdenvLinuxBoot3Pkgs;}) ((import ../common-path.nix) {pkgs = stdenvLinuxBoot4Pkgs;})
++ [stdenvLinuxBoot3Pkgs.patchelf]; ++ [stdenvLinuxBoot4Pkgs.patchelf];
gcc = wrapGCC rec { gcc = wrapGCC rec {
inherit (stdenvLinuxBoot2Pkgs) binutils; inherit (stdenvLinuxBoot3Pkgs) binutils;
inherit (stdenvLinuxBoot3Pkgs) coreutils; inherit (stdenvLinuxBoot4Pkgs) coreutils;
libc = stdenvLinuxGlibc; libc = stdenvLinuxGlibc;
gcc = gccWithStaticLibs; gcc = gccWithStaticLibs;
shell = stdenvLinuxBoot3Pkgs.bash + "/bin/bash"; shell = stdenvLinuxBoot4Pkgs.bash + "/bin/bash";
name = ""; name = "";
}; };
shell = stdenvLinuxBoot3Pkgs.bash + "/bin/bash"; shell = stdenvLinuxBoot4Pkgs.bash + "/bin/bash";
fetchurlBoot = fetchurl; fetchurlBoot = fetchurl;
extraAttrs = { extraAttrs = {
inherit (stdenvLinuxBoot2Pkgs) glibc; inherit (stdenvLinuxBoot3Pkgs) glibc;
inherit platform; inherit platform;
}; };
overrides = { overrides = {
inherit gcc; inherit gcc;
inherit (stdenvLinuxBoot2Pkgs) binutils glibc; inherit (stdenvLinuxBoot3Pkgs) binutils glibc;
inherit (stdenvLinuxBoot3Pkgs) inherit (stdenvLinuxBoot4Pkgs)
gzip bzip2 bash coreutils diffutils findutils gawk gzip bzip2 bash coreutils diffutils findutils gawk
gnumake gnused gnutar gnugrep gnupatch patchelf gnumake gnused gnutar gnugrep gnupatch patchelf
attr acl; attr acl;