From 231b016142c78b1be90a6e0757b0ed580b3c03bb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 19 Jan 2010 11:25:33 +0000 Subject: [PATCH] * During the bootstrap, build only 1 instance of Perl instead of 3. svn path=/nixpkgs/branches/stdenv-updates/; revision=19536 --- pkgs/stdenv/linux/default.nix | 23 ++++++++++++++++++----- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index e04b81b152b2..dd5647bec456 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -137,8 +137,11 @@ rec { # of bootstrap tools only, and a minimal Glibc to keep the GCC # configure script happy. stdenvLinuxBoot1 = stdenvBootFun { - gcc = wrapGCC {libc = bootstrapGlibc; binutils = bootstrapTools; - coreutils = bootstrapTools; }; + gcc = wrapGCC { + libc = bootstrapGlibc; + binutils = bootstrapTools; + coreutils = bootstrapTools; + }; inherit fetchurl; }; @@ -160,9 +163,15 @@ rec { # this one uses the Glibc built in step 3. It still uses # the rest of the bootstrap tools, including GCC. stdenvLinuxBoot2 = removeAttrs (stdenvBootFun { - gcc = wrapGCC {binutils = bootstrapTools; coreutils = bootstrapTools; - libc = stdenvLinuxGlibc;}; - extraAttrs = {glibc = stdenvLinuxGlibc;}; + gcc = wrapGCC { + binutils = bootstrapTools; + coreutils = bootstrapTools; + libc = stdenvLinuxGlibc; + }; + extraAttrs = { + glibc = stdenvLinuxGlibc; + inherit (stdenvLinuxBoot1Pkgs) perl; + }; inherit fetchurl; }) ["gcc" "binutils"]; @@ -186,6 +195,9 @@ rec { gcc = stdenvLinuxBoot2Pkgs.gcc.gcc; name = ""; }; + extraAttrs = { + inherit (stdenvLinuxBoot1Pkgs) perl; + }; inherit fetchurl; }; @@ -196,6 +208,7 @@ rec { bootStdenv = stdenvLinuxBoot3; }; + # 8) Construct the final stdenv. It uses the Glibc, GCC and # Binutils built above, and adds in dynamically linked versions # of all other tools. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a2fef41f26cf..2858a2694aa9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2476,7 +2476,8 @@ let impureLibcPath = if stdenv.isLinux then null else "/usr"; }; - perl = if system != "i686-cygwin" then perl510 else sysPerl; + perl = useFromStdenv "perl" + (if system != "i686-cygwin" then perl510 else sysPerl); # FIXME: unixODBC needs patching on Darwin (see darwinports) phpOld = import ../development/interpreters/php {