* Merge all-packages.nix into all-packages-generic.nix.

svn path=/nixpkgs/branches/usability/; revision=4765
This commit is contained in:
Eelco Dolstra 2006-02-08 17:37:45 +00:00
parent 7054f5c11e
commit ffe91d36c3
3 changed files with 51 additions and 29 deletions

View file

@ -144,8 +144,8 @@ 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 {
stdenv = stdenvLinuxBoot1; bootStdenv = stdenvLinuxBoot1;
bootCurl = curl; # bootCurl = curl;
}; };
# 3) Build Glibc with the statically linked tools. The result is the # 3) Build Glibc with the statically linked tools. The result is the
@ -163,8 +163,8 @@ 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 {
stdenv = stdenvLinuxBoot2; bootStdenv = stdenvLinuxBoot2;
bootCurl = curl; # bootCurl = curl;
}; };
# 6) Construct a third stdenv identical to the second, except that # 6) Construct a third stdenv identical to the second, except that
@ -178,8 +178,8 @@ 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 {
stdenv = stdenvLinuxBoot3; bootStdenv = stdenvLinuxBoot3;
bootCurl = curl; # bootCurl = curl;
}; };
# 8) Construct the final stdenv. It uses the Glibc, GCC and # 8) Construct the final stdenv. It uses the Glibc, GCC and
@ -211,8 +211,8 @@ rec {
# Reuse the tools built in the previous steps. # Reuse the tools built in the previous steps.
stdenvLinuxPkgs = stdenvLinuxPkgs =
allPackages { allPackages {
stdenv = stdenvLinux; bootStdenv = stdenvLinux;
bootCurl = stdenvLinuxBoot3Pkgs.curl; # bootCurl = stdenvLinuxBoot3Pkgs.curl;
} // } //
{inherit (stdenvLinuxBoot2Pkgs) binutils gcc;} // {inherit (stdenvLinuxBoot2Pkgs) binutils gcc;} //
{inherit (stdenvLinuxBoot3Pkgs) {inherit (stdenvLinuxBoot3Pkgs)

View file

@ -1,17 +1,27 @@
# This file evaluates to a function that, when supplied with a system /* This file composes the Nix Packages collection. That is, it
# identifier and a standard build environment, returns the set of all imports the functions that build the various packages, and calls
# packages provided by the Nix Package Collection. them with appropriate arguments. The result is a set of all the
packages in the Nix Packages collection for some particular
platform. */
{ stdenv, bootCurl, noSysDirs ? true { # The system for which to build the packages.
system ? __currentSystem
, # The standard environment to use. Only used for bootstrapping. If
# null, the default standard environment is used.
bootStdenv ? null
# More flags for the bootstrapping of stdenv.
, noSysDirs ? true
, gccWithCC ? true , gccWithCC ? true
, gccWithProfiling ? true , gccWithProfiling ? true
}: }:
rec { rec {
inherit stdenv;
### Symbolic names. ### Symbolic names.
useOldXLibs = false; useOldXLibs = false;
@ -25,6 +35,19 @@ rec {
# `xlibs.xlibs' is a wrapper packages that combines libX11 and a bunch # `xlibs.xlibs' is a wrapper packages that combines libX11 and a bunch
# of other basic X client libraries. # of other basic X client libraries.
x11 = if useOldXLibs then xlibsOld.xlibs else xlibsWrapper; x11 = if useOldXLibs then xlibsOld.xlibs else xlibsWrapper;
### STANDARD ENVIRONMENT
stdenv = if bootStdenv == null then defaultStdenv else bootStdenv;
defaultStdenv =
(import ./stdenvs.nix {
inherit system;
allPackages = import ./all-packages-generic.nix;
}).stdenv;
bootCurl = null;
### BUILD SUPPORT ### BUILD SUPPORT

View file

@ -5,7 +5,9 @@
# Posix utilities, the GNU C compiler, and so on. On other systems, # Posix utilities, the GNU C compiler, and so on. On other systems,
# we use the native C library. # we use the native C library.
{system, allPackages}: rec { {system, allPackages}:
rec {
gccWrapper = import ../build-support/gcc-wrapper; gccWrapper = import ../build-support/gcc-wrapper;
genericStdenv = import ../stdenv/generic; genericStdenv = import ../stdenv/generic;
@ -29,8 +31,7 @@
}; };
stdenvNativePkgs = allPackages { stdenvNativePkgs = allPackages {
stdenv = stdenvNative; bootStdenv = stdenvNative;
bootCurl = null;
noSysDirs = false; noSysDirs = false;
}; };
@ -43,8 +44,7 @@
}; };
stdenvNixPkgs = allPackages { stdenvNixPkgs = allPackages {
stdenv = stdenvNix; bootStdenv = stdenvNix;
bootCurl = stdenvNativePkgs.curl;
noSysDirs = false; noSysDirs = false;
}; };
@ -62,8 +62,7 @@
}; };
stdenvDarwinPkgs = allPackages { stdenvDarwinPkgs = allPackages {
stdenv = stdenvDarwin; bootStdenv = stdenvDarwin;
bootCurl = null;
noSysDirs = false; noSysDirs = false;
}; };
@ -77,15 +76,15 @@
}; };
stdenvFreeBSDPkgs = allPackages { stdenvFreeBSDPkgs = allPackages {
stdenv = stdenvFreeBSD; bootStdenv = stdenvFreeBSD;
bootCurl = null;
noSysDirs = false; noSysDirs = false;
}; };
stdenvTestPkgs = allPackages { # Select the appropriate stdenv for the platform `system'.
stdenv = (import ../stdenv/nix-linux-static).stdenvInitial; stdenv =
bootCurl = (import ../stdenv/nix-linux-static).curl; if system == "i686-linux" then stdenvLinux
noSysDirs = true; else if system == "i686-freebsd" then stdenvFreeBSD
}; else if system == "powerpc-darwin" then stdenvDarwin
else stdenvNative;
} }