summary refs log tree commit diff
path: root/pkgs/top-level
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/top-level')
-rw-r--r--pkgs/top-level/all-packages.nix410
-rw-r--r--pkgs/top-level/platforms.nix52
-rw-r--r--pkgs/top-level/release.nix4
3 files changed, 350 insertions, 116 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 9f90f0318a3..887ec12fe0b 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -33,6 +33,7 @@
   # argument.  Otherwise, it's read from $NIXPKGS_CONFIG or
   # ~/.nixpkgs/config.nix.
   config ? null
+, crossSystem ? null
 }:
 
 
@@ -131,7 +132,8 @@ let
   # inside the set for derivations.
   recurseIntoAttrs = attrs: attrs // {recurseForDerivations = true;};
 
-  useFromStdenv = it : alternative : if (builtins.hasAttr it stdenv) then
+  useFromStdenv = it : alternative : if ((bootStdenv != null ||
+    crossSystem == null) && builtins.hasAttr it stdenv) then
     (builtins.getAttr it stdenv) else alternative;
 
   # Return the first available value in the order: pkg.val, val, or default.
@@ -168,15 +170,20 @@ let
 
   defaultStdenv = allStdenvs.stdenv;
 
-  stdenv =
+  stdenvCross = makeStdenvCross defaultStdenv crossSystem (binutilsCross crossSystem)
+    (gccCrossStageFinal crossSystem);
+
+  stdenv = 
     if bootStdenv != null then bootStdenv else
       let changer = getConfig ["replaceStdenv"] null;
       in if changer != null then
         changer {
-          stdenv = defaultStdenv;
+          stdenv = stdenvCross;
           overrideSetup = overrideSetup;
         }
-      else defaultStdenv;
+      else stdenvCross;
+
+  forceBuildDrv = drv : drv // { hostDrv = drv.buildDrv; };
 
   # A stdenv capable of building 32-bit binaries.  On x86_64-linux,
   # it uses GCC compiled with multilib support; on i686-linux, it's
@@ -187,7 +194,6 @@ let
     else
       stdenv;
 
-
   ### BUILD SUPPORT
 
   attrSetToDir = arg : import ../build-support/upstream-updater/attrset-to-dir.nix {
@@ -248,7 +254,8 @@ let
   # from being built.
   fetchurl = useFromStdenv "fetchurl"
     (import ../build-support/fetchurl {
-      inherit curl stdenv;
+      curl = curl;
+      stdenv = stdenv;
     });
 
   # fetchurlBoot is used for curl and its dependencies in order to
@@ -268,7 +275,7 @@ let
   };
 
   makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix {
-    inherit stdenv perl cpio contents;
+    inherit stdenv perl cpio contents platform;
   };
 
   makeWrapper = makeSetupHook ../build-support/make-wrapper/make-wrapper.sh;
@@ -303,6 +310,11 @@ let
     inherit pkgs lib;
   };
 
+  platforms = import ./platforms.nix {
+    inherit system pkgs;
+  };
+
+  platform = platforms.pc;
 
   ### TOOLS
 
@@ -480,14 +492,15 @@ let
     inherit fetchurl stdenv ppl;
   };
 
-  coreutils = useFromStdenv "coreutils"
-    (makeOverridable (if stdenv ? isDietLibC
+  coreutils_real = makeOverridable (if stdenv ? isDietLibC
       then import ../tools/misc/coreutils-5
       else import ../tools/misc/coreutils)
     {
-      inherit fetchurl stdenv acl;
+      inherit fetchurl stdenv acl perl gmp;
       aclSupport = stdenv.isLinux;
-    });
+    };
+
+  coreutils = useFromStdenv "coreutils" coreutils_real;
 
   cpio = import ../tools/archivers/cpio {
     inherit fetchurl stdenv;
@@ -501,7 +514,7 @@ let
     inherit fetchurl stdenv;
   };
 
-  curl = import ../tools/networking/curl {
+  curl = makeOverridable (import ../tools/networking/curl) {
     fetchurl = fetchurlBoot;
     inherit stdenv zlib openssl;
     zlibSupport = ! ((stdenv ? isDietLibC) || (stdenv ? isStatic));
@@ -943,9 +956,7 @@ let
       readline nettools lsof procps;
   };
 
-  lzma = import ../tools/compression/lzma {
-    inherit fetchurl stdenv;
-  };
+  lzma = xz;
 
   xz = import ../tools/compression/xz {
     inherit fetchurl stdenv lib;
@@ -1001,7 +1012,7 @@ let
   };
 
   mldonkey = import ../applications/networking/p2p/mldonkey {
-    inherit fetchurl stdenv ocaml zlib ncurses;
+    inherit fetchurl stdenv ocaml zlib ncurses gd libpng;
   };
 
   monit = builderDefsPackage ../tools/system/monit {
@@ -1480,7 +1491,7 @@ let
 
   tcng = import ../tools/networking/tcng {
     inherit fetchurl stdenv iproute bison flex db4 perl;
-    kernel = kernel_2_6_28;
+    kernel = linux_2_6_28;
   };
 
   telnet = import ../tools/networking/telnet {
@@ -1614,7 +1625,7 @@ let
   };
 
   wget = import ../tools/networking/wget {
-    inherit fetchurl stdenv gettext openssl;
+    inherit fetchurl stdenv gettext gnutls perl;
   };
 
   which = import ../tools/system/which {
@@ -1749,7 +1760,7 @@ let
     inherit fetchurl stdenv gawk system;
   };
 
-  gcc = gcc43;
+  gcc = gcc44;
 
   gcc295 = wrapGCC (import ../development/compilers/gcc-2.95 {
     inherit fetchurl stdenv noSysDirs;
@@ -1785,22 +1796,57 @@ let
     profiledCompiler = false;
   });
 
-  gcc43 = useFromStdenv "gcc" gcc43_real;
+  gcc44 = useFromStdenv "gcc" gcc44_real;
 
-  gcc43_wrapper2 = wrapGCC2 gcc43.gcc;
-
-  gcc43_real = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.3) {
-    inherit fetchurl stdenv texinfo gmp mpfr noSysDirs;
+  gcc43 = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.3) {
+    inherit stdenv fetchurl texinfo gmp mpfr noSysDirs;
     profiledCompiler = true;
   }));
 
-  gcc43_multi = lowPrio (wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi (gcc43_real.gcc.override {
+  gcc43_realCross = cross : makeOverridable (import ../development/compilers/gcc-4.3) {
+    inherit stdenv fetchurl texinfo gmp mpfr noSysDirs cross;
+    binutilsCross = binutilsCross cross;
+    libcCross = libcCross cross;
+    profiledCompiler = false;
+    enableMultilib = true;
+    crossStageStatic = false;
+  };
+
+  gcc44_realCross = cross : makeOverridable (import ../development/compilers/gcc-4.4) {
+    inherit stdenv fetchurl texinfo gmp mpfr ppl cloogppl noSysDirs cross
+        gettext which;
+    binutilsCross = binutilsCross cross;
+    libcCross = libcCross cross;
+    profiledCompiler = false;
+    enableMultilib = true;
+    crossStageStatic = false;
+  };
+
+  gccCrossStageStatic = cross: wrapGCCCross {
+    gcc = forceBuildDrv ((gcc44_realCross cross).override {
+        crossStageStatic = true;
+        langCC = false;
+        libcCross = null;
+    });
+    libc = null;
+    binutils = binutilsCross cross;
+    inherit cross;
+  };
+
+  gccCrossStageFinal = cross: wrapGCCCross {
+    gcc = forceBuildDrv (gcc44_realCross cross);
+    libc = libcCross cross;
+    binutils = binutilsCross cross;
+    inherit cross;
+  };
+
+  gcc43_multi = lowPrio (wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi (gcc43.gcc.override {
     stdenv = overrideGCC stdenv (wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi gcc);
     profiledCompiler = false;
     enableMultilib = true;
   }));
 
-  gcc44 = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.4) {
+  gcc44_real = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.4) {
     inherit fetchurl stdenv texinfo gmp mpfr ppl cloogppl
       gettext which noSysDirs;
     profiledCompiler = true;
@@ -1842,7 +1888,7 @@ let
     inherit gmp mpfr;
   });
 
-  gfortran43 = wrapGCC (gcc43_real.gcc.override {
+  gfortran43 = wrapGCC (gcc43.gcc.override {
     name = "gfortran";
     langFortran = true;
     langCC = false;
@@ -1874,6 +1920,35 @@ let
       libXrandr xproto renderproto xextproto inputproto randrproto;
   });
 
+  gnat = gnat44;
+
+  gnat44 = wrapGNAT (gcc44_real.gcc.override {
+    name = "gnat";
+    langCC = false;
+    langC = true;
+    langAda = true;
+    profiledCompiler = false;
+    inherit gnatboot;
+    # We can't use the ppl stuff, because we would have
+    # libstdc++ problems.
+    cloogppl = null;
+    ppl = null;
+  });
+
+  gnatboot = wrapGNAT (import ../development/compilers/gnatboot {
+    inherit fetchurl stdenv;
+  });
+
+  ghdl = wrapGHDL (import ../development/compilers/gcc-4.3 {
+    inherit stdenv fetchurl texinfo gmp mpfr noSysDirs gnat;
+    name = "ghdl-0.28";
+    langVhdl = true;
+    langCC = false;
+    langC = false;
+    profiledCompiler = false;
+    enableMultilib = false;
+  });
+
   /*
   Broken; fails because of unability to find its own symbols during linking
 
@@ -2126,7 +2201,7 @@ let
   ocaml = ocaml_3_11_1;
 
   ocaml_3_08_0 = import ../development/compilers/ocaml/3.08.0.nix {
-    inherit fetchurl stdenv x11 ncurses;
+    inherit fetchurl stdenv fetchcvs x11 ncurses;
   };
 
   ocaml_3_09_1 = import ../development/compilers/ocaml/3.09.1.nix {
@@ -2216,17 +2291,40 @@ let
     inherit fetchurl stdenv visualcpp windowssdk;
   };
 
+  # All these wrappers: GCC, GNAT, GHDL, should be once merged into
+  # only one.
   wrapGCCWith = gccWrapper: glibc: baseGCC: gccWrapper {
     nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
     nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc;
     nativePrefix = if stdenv ? gcc then stdenv.gcc.nativePrefix else "";
     gcc = baseGCC;
     libc = glibc;
-    inherit stdenv binutils;
+    inherit stdenv binutils coreutils;
   };
 
   wrapGCC = wrapGCCWith (import ../build-support/gcc-wrapper) glibc;
-  wrapGCC2 = wrapGCCWith (import ../build-support/gcc-wrapper2) glibc;
+  wrapGNAT = wrapGCCWith (import ../build-support/gnat-wrapper) glibc;
+
+  wrapGHDLWith = gccWrapper: glibc: baseGCC: gccWrapper {
+    nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
+    nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc;
+    nativePrefix = if stdenv ? gcc then stdenv.gcc.nativePrefix else "";
+    gcc = baseGCC;
+    libc = glibc;
+    inherit stdenv binutils coreutils zlib;
+  };
+
+  wrapGHDL = wrapGHDLWith (import ../build-support/ghdl-wrapper) glibc;
+
+  wrapGCCCross =
+    {gcc, libc, binutils, cross, shell ? "", name ? "gcc-cross-wrapper"}:
+    
+    forceBuildDrv (import ../build-support/gcc-cross-wrapper {
+      nativeTools = false;
+      nativeLibc = false;
+      noLibc = (libc == null);
+      inherit stdenv gcc binutils libc shell name cross;
+    });
 
   # FIXME: This is a specific hack for GCC-UPC.  Eventually, we may
   # want to merge `gcc-upc-wrapper' and `gcc-wrapper'.
@@ -2326,7 +2424,7 @@ let
       impureLibcPath = if stdenv.isLinux then null else "/usr";
     };
 
-  perl510 = import ../development/interpreters/perl-5.10 {
+  perl510 = makeOverridable (import ../development/interpreters/perl-5.10) {
     inherit stdenv;
     fetchurl = fetchurlBoot;
     impureLibcPath = if stdenv.isLinux then null else "/usr";
@@ -2609,6 +2707,11 @@ let
       inherit fetchurl stdenv noSysDirs;
     });
 
+  binutilsCross = cross : forceBuildDrv (import ../development/tools/misc/binutils {
+      inherit stdenv fetchurl cross;
+      noSysDirs = true;
+  });
+
   bison = bison23;
 
   bison1875 = import ../development/tools/parsing/bison/bison-1.875.nix {
@@ -2756,7 +2859,7 @@ let
     inherit fetchurl stdenv;
   };
 
-  gnum4 = import ../development/tools/misc/gnum4 {
+  gnum4 = makeOverridable (import ../development/tools/misc/gnum4) {
     inherit fetchurl stdenv;
   };
 
@@ -2842,7 +2945,7 @@ let
 
   openafsClient = import ../servers/openafs-client {
     inherit stdenv fetchurl autoconf automake flex yacc;
-    inherit kernel_2_6_28 glibc ncurses perl krb5;
+    inherit linux_2_6_28 glibc ncurses perl krb5;
   };
 
   openocd = import ../development/tools/misc/openocd {
@@ -2871,11 +2974,19 @@ let
    * pkgconfig is optionally taken from the stdenv to allow bootstrapping
    * of glib and pkgconfig itself on MinGW.
    */
-  pkgconfig = useFromStdenv "pkgconfig"
+  pkgconfigReal = useFromStdenv "pkgconfig"
     (import ../development/tools/misc/pkgconfig {
       inherit fetchurl stdenv;
     });
 
+  /* Make pkgconfig always return a buildDrv, never a proper hostDrv,
+     because most usage of pkgconfig as buildInput (inheritance of
+     pre-cross nixpkgs) means using it using as buildNativeInput
+     cross_renaming: we should make all programs use pkgconfig as
+     buildNativeInput after the renaming.
+     */
+  pkgconfig = forceBuildDrv pkgconfigReal;
+
   radare = import ../development/tools/analysis/radare {
     inherit stdenv fetchurl pkgconfig libusb readline gtkdialog python
       ruby libewf perl;
@@ -2940,7 +3051,7 @@ let
     inherit fetchurl stdenv ncurses;
   };
 
-  texinfo = import ../development/tools/misc/texinfo {
+  texinfo = makeOverridable (import ../development/tools/misc/texinfo) {
     inherit fetchurl stdenv ncurses lzma;
   };
 
@@ -2957,6 +3068,12 @@ let
     readline = readline5;
   };
 
+  gdbCross = import ../development/tools/misc/gdb {
+    inherit fetchurl stdenv ncurses gmp mpfr expat texinfo;
+    readline = readline5;
+    target = crossSystem;
+  };
+
   valgrind = import ../development/tools/analysis/valgrind {
     inherit fetchurl stdenv perl gdb;
   };
@@ -3187,7 +3304,7 @@ let
   };
 
   cyrus_sasl = import ../development/libraries/cyrus-sasl {
-    inherit fetchurl stdenv openssl db4 gettext;
+    inherit stdenv fetchurl openssl db4 gettext;
   };
 
   db4 = db45;
@@ -3410,28 +3527,75 @@ let
     let haveRedHatKernel       = system == "i686-linux" || system == "x86_64-linux";
         haveBrokenRedHatKernel = haveRedHatKernel && getConfig ["brokenRedHatKernel"] false;
     in
-    useFromStdenv "glibc" (if haveBrokenRedHatKernel then glibc25 else glibc29);
+    useFromStdenv "glibc" (if haveBrokenRedHatKernel then glibc25 else
+        glibc211);
 
   glibc25 = import ../development/libraries/glibc-2.5 {
-    inherit fetchurl stdenv kernelHeaders;
+    inherit fetchurl stdenv;
+    kernelHeaders = linuxHeaders;
     installLocales = getPkgConfig "glibc" "locales" false;
   };
 
   glibc27 = import ../development/libraries/glibc-2.7 {
-    inherit fetchurl stdenv kernelHeaders;
+    inherit fetchurl stdenv;
+    kernelHeaders = linuxHeaders;
     #installLocales = false;
   };
 
-  glibc29 = import ../development/libraries/glibc-2.9 {
-    inherit fetchurl stdenv kernelHeaders;
+  glibc29 = makeOverridable (import ../development/libraries/glibc-2.9) {
+    inherit fetchurl stdenv;
+    kernelHeaders = linuxHeaders;
+    installLocales = getPkgConfig "glibc" "locales" false;
+  };
+
+  glibc29Cross = cross: forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.9) {
+    inherit stdenv fetchurl;
+    gccCross = gccCrossStageStatic cross;
+    kernelHeaders = linuxHeadersCross cross;
+    installLocales = getPkgConfig "glibc" "locales" false;
+  });
+
+  glibc210 = makeOverridable (import ../development/libraries/glibc-2.10) {
+    inherit fetchurl stdenv;
+    kernelHeaders = linuxHeaders;
+    installLocales = getPkgConfig "glibc" "locales" false;
+  };
+
+  glibc210Cross = cross: forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.10) {
+    inherit stdenv fetchurl;
+    gccCross = gccCrossStageStatic cross;
+    kernelHeaders = linuxHeadersCross cross;
+    installLocales = getPkgConfig "glibc" "locales" false;
+  });
+
+  glibc211 = makeOverridable (import ../development/libraries/glibc-2.11) {
+    inherit fetchurl stdenv;
+    kernelHeaders = linuxHeaders;
+    installLocales = getPkgConfig "glibc" "locales" false;
+  };
+
+  glibc211Cross = cross : forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.11) {
+    inherit stdenv fetchurl;
+    gccCross = gccCrossStageStatic cross;
+    kernelHeaders = linuxHeadersCross cross;
+    installLocales = getPkgConfig "glibc" "locales" false;
+  });
+
+  # We can choose:
+  libcCross = cross: glibc211Cross cross;
+  # libcCross = cross: uclibcCross cross;
+
+  eglibc = import ../development/libraries/eglibc {
+    inherit fetchsvn stdenv;
+    kernelHeaders = linuxHeaders;
     installLocales = getPkgConfig "glibc" "locales" false;
   };
 
-  glibcLocales = makeOverridable (import ../development/libraries/glibc-2.9/locales.nix) {
+  glibcLocales = makeOverridable (import ../development/libraries/glibc-2.11/locales.nix) {
     inherit fetchurl stdenv;
   };
 
-  glibcInfo = import ../development/libraries/glibc-2.9/info.nix {
+  glibcInfo = import ../development/libraries/glibc-2.11/info.nix {
     inherit fetchurl stdenv texinfo perl;
   };
 
@@ -3466,14 +3630,12 @@ let
   };
 
   gmp = import ../development/libraries/gmp {
-    inherit fetchurl stdenv m4;
-    cxx = false;
+    inherit stdenv fetchurl m4;
   };
 
-  gmpxx = import ../development/libraries/gmp {
-    inherit fetchurl stdenv m4;
-    cxx = true;
-  };
+  # `gmpxx' used to mean "GMP with C++ bindings".  Now `gmp' has C++ bindings
+  # by default, so that distinction is obsolete.
+  gmpxx = gmp;
 
   goffice = import ../development/libraries/goffice {
     inherit fetchurl stdenv pkgconfig libgsf libxml2 cairo
@@ -3490,7 +3652,7 @@ let
 
   #GMP ex-satellite, so better keep it near gmp
   mpfr = import ../development/libraries/mpfr {
-    inherit fetchurl stdenv gmp;
+    inherit stdenv fetchurl gmp;
   };
 
   gst_all = recurseIntoAttrs (import ../development/libraries/gstreamer {
@@ -4212,9 +4374,11 @@ let
     inherit fetchurl stdenv;
   };
 
-  ncurses = composedArgsAndFun (import ../development/libraries/ncurses) {
+  ncurses = makeOverridable (composedArgsAndFun (import ../development/libraries/ncurses)) {
     inherit fetchurl stdenv;
-    unicode = (system != "i686-cygwin");
+    # The "! (stdenv ? cross)" is for the cross-built arm ncurses, which
+    # don't build for me in unicode.
+    unicode = (system != "i686-cygwin" && ! (stdenv ? cross));
   };
 
   neon = neon026;
@@ -4251,8 +4415,7 @@ let
   };
 
   openal = import ../development/libraries/openal {
-    inherit fetchurl cmake alsaLib;
-    stdenv = overrideGCC stdenv gcc43_wrapper2;
+    inherit fetchurl stdenv cmake alsaLib;
   };
 
   # added because I hope that it has been easier to compile on x86 (for blender)
@@ -4297,7 +4460,7 @@ let
       pkgconfig;
   };
 
-  openssl = import ../development/libraries/openssl {
+  openssl = makeOverridable (import ../development/libraries/openssl) {
     fetchurl = fetchurlBoot;
     inherit stdenv perl;
   };
@@ -4658,7 +4821,7 @@ let
     inherit ncurses flex bison autoconf automake m4 coreutils;
   };
 
-  zlib = import ../development/libraries/zlib {
+  zlib = makeOverridable (import ../development/libraries/zlib) {
     fetchurl = fetchurlBoot;
     inherit stdenv;
   };
@@ -5181,7 +5344,7 @@ let
   };
 
   autofs5 = import ../os-specific/linux/autofs/autofs-v5.nix {
-    inherit sourceFromHead fetchurl stdenv flex bison kernelHeaders;
+    inherit sourceFromHead fetchurl stdenv flex bison linuxHeaders;
   };
 
   _915resolution = import ../os-specific/linux/915resolution {
@@ -5231,7 +5394,7 @@ let
     import ../os-specific/linux/cpufrequtils {
     inherit fetchurl stdenv libtool gettext;
     glibc = stdenv.gcc.libc;
-    kernelHeaders = stdenv.gcc.libc.kernelHeaders;
+    linuxHeaders = stdenv.gcc.libc.kernelHeaders;
   });
 
   cryopid = import ../os-specific/linux/cryopid {
@@ -5351,7 +5514,7 @@ let
     import ../os-specific/linux/iputils {
     inherit fetchurl stdenv;
     glibc = stdenv.gcc.libc;
-    kernelHeaders = stdenv.gcc.libc.kernelHeaders;
+    linuxHeaders = stdenv.gcc.libc.kernelHeaders;
   });
 
   iptables = import ../os-specific/linux/iptables {
@@ -5386,27 +5549,31 @@ let
     inherit fetchurl stdenv bison flex;
   };
 
-  kernelHeaders = kernelHeaders_2_6_28;
+  linuxHeaders = linuxHeaders_2_6_28;
 
-  kernelHeaders_2_6_18 = import ../os-specific/linux/kernel-headers/2.6.18.5.nix {
+  linuxHeadersCross = cross : forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.28.nix {
+    inherit stdenv fetchurl cross perl;
+  });
+
+  linuxHeaders_2_6_18 = import ../os-specific/linux/kernel-headers/2.6.18.5.nix {
     inherit fetchurl stdenv unifdef;
   };
 
-  kernelHeaders_2_6_28 = import ../os-specific/linux/kernel-headers/2.6.28.nix {
+  linuxHeaders_2_6_28 = import ../os-specific/linux/kernel-headers/2.6.28.nix {
     inherit fetchurl stdenv perl;
   };
 
-  kernelHeadersArm = import ../os-specific/linux/kernel-headers-cross {
+  linuxHeadersArm = import ../os-specific/linux/kernel-headers-cross {
     inherit fetchurl stdenv;
     cross = "arm-linux";
   };
 
-  kernelHeadersMips = import ../os-specific/linux/kernel-headers-cross {
+  linuxHeadersMips = import ../os-specific/linux/kernel-headers-cross {
     inherit fetchurl stdenv;
     cross = "mips-linux";
   };
 
-  kernelHeadersSparc = import ../os-specific/linux/kernel-headers-cross {
+  linuxHeadersSparc = import ../os-specific/linux/kernel-headers-cross {
     inherit fetchurl stdenv;
     cross = "sparc-linux";
   };
@@ -5415,7 +5582,7 @@ let
     inherit fetchurl;
   };
 
-  kernel_2_6_25 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.25.nix) {
+  linux_2_6_25 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.25.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools;
     kernelPatches =
       [ kernelPatches.fbcondecor_2_6_25
@@ -5423,7 +5590,7 @@ let
       ];
   };
 
-  kernel_2_6_27 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.27.nix) {
+  linux_2_6_27 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.27.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools;
     kernelPatches =
       [ kernelPatches.fbcondecor_2_6_27
@@ -5431,7 +5598,7 @@ let
       ];
   };
 
-  kernel_2_6_28 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.28.nix) {
+  linux_2_6_28 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.28.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools;
     kernelPatches =
       [ kernelPatches.fbcondecor_2_6_28
@@ -5440,7 +5607,7 @@ let
       ];
   };
 
-  kernel_2_6_29 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.29.nix) {
+  linux_2_6_29 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.29.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools;
     kernelPatches =
       [ kernelPatches.fbcondecor_2_6_29
@@ -5448,47 +5615,48 @@ let
       ];
   };
 
-  kernel_2_6_31 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.31.nix) {
-    inherit fetchurl stdenv perl mktemp module_init_tools;
+  linux_2_6_31 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.31.nix) {
+    inherit fetchurl stdenv perl mktemp module_init_tools platform;
     kernelPatches = [];
   };
 
-  kernel_2_6_31_zen5 = makeOverridable (import ../os-specific/linux/zen-kernel/2.6.31-zen5.nix) {
+  linux_2_6_31_zen5 = makeOverridable (import ../os-specific/linux/zen-kernel/2.6.31-zen5.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools
       lib builderDefs;
+    inherit platform;
   };
 
-  kernel_2_6_31_zen5_bfs = kernel_2_6_31_zen5.override {
+  linux_2_6_31_zen5_bfs = linux_2_6_31_zen5.override {
     ckSched = true;
   };
 
-  kernel_2_6_31_zen7 = makeOverridable (import ../os-specific/linux/zen-kernel/zen-stable.nix) {
+  linux_2_6_31_zen7 = makeOverridable (import ../os-specific/linux/zen-kernel/zen-stable.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools
       lib builderDefs;
   };
 
-  kernel_2_6_31_zen7_bfs = kernel_2_6_31_zen7.override {
+  linux_2_6_31_zen7_bfs = linux_2_6_31_zen7.override {
     ckSched = true;
   };
 
-  kernel_2_6_31_zen = kernel_2_6_31_zen7;
-  kernel_2_6_31_zen_bfs = kernel_2_6_31_zen7_bfs;
+  linux_2_6_31_zen = linux_2_6_31_zen7;
+  linux_2_6_31_zen_bfs = linux_2_6_31_zen7_bfs;
 
-  kernel_2_6_32 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.32.nix) {
-    inherit fetchurl stdenv perl mktemp module_init_tools;
+  linux_2_6_32 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.32.nix) {
+    inherit fetchurl stdenv perl mktemp module_init_tools platform;
     kernelPatches =
       [ kernelPatches.fbcondecor_2_6_31
         kernelPatches.sec_perm_2_6_24
       ];
   };
 
-  /* Kernel modules are inherently tied to a specific kernel.  So
+  /* Linux kernel modules are inherently tied to a specific kernel.  So
      rather than provide specific instances of those packages for a
      specific kernel, we have a function that builds those packages
      for a specific kernel.  This function can then be called for
      whatever kernel you're using. */
 
-  kernelPackagesFor = kernel: rec {
+  linuxPackagesFor = kernel: rec {
 
     inherit kernel;
 
@@ -5574,7 +5742,7 @@ let
       inherit fetchurl stdenv perl curl bzip2 openssl bison;
       inherit libtool automake autoconf docbook5 docbook5_xsl libxslt docbook_xml_dtd_43 w3m;
 
-      aterm = aterm242fixes;
+      aterm = aterm25;
       db4 = db45;
 
       flex = flex2533;
@@ -5604,18 +5772,18 @@ let
   };
 
   # Build the kernel modules for the some of the kernels.
-  kernelPackages_2_6_25 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_25);
-  kernelPackages_2_6_27 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_27);
-  kernelPackages_2_6_28 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_28);
-  kernelPackages_2_6_29 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_29);
-  kernelPackages_2_6_31_zen5 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31_zen5);
-  kernelPackages_2_6_31_zen = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31_zen);
-  kernelPackages_2_6_31_zen_bfs = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31_zen_bfs);
-  kernelPackages_2_6_31 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31);
-  kernelPackages_2_6_32 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_32);
-
-  # The current default kernel / kernel modules.
-  kernelPackages = kernelPackages_2_6_28;
+  linuxPackages_2_6_25 = recurseIntoAttrs (linuxPackagesFor linux_2_6_25);
+  linuxPackages_2_6_27 = recurseIntoAttrs (linuxPackagesFor linux_2_6_27);
+  linuxPackages_2_6_28 = recurseIntoAttrs (linuxPackagesFor linux_2_6_28);
+  linuxPackages_2_6_29 = recurseIntoAttrs (linuxPackagesFor linux_2_6_29);
+  linuxPackages_2_6_31_zen5 = recurseIntoAttrs (linuxPackagesFor linux_2_6_31_zen5);
+  linuxPackages_2_6_31_zen = recurseIntoAttrs (linuxPackagesFor linux_2_6_31_zen);
+  linuxPackages_2_6_31_zen_bfs = recurseIntoAttrs (linuxPackagesFor linux_2_6_31_zen_bfs);
+  linuxPackages_2_6_31 = recurseIntoAttrs (linuxPackagesFor linux_2_6_31);
+  linuxPackages_2_6_32 = recurseIntoAttrs (linuxPackagesFor linux_2_6_32);
+
+  # The current default Linux kernel & modules.
+  linuxPackages = linuxPackages_2_6_28;
 
   customKernel = composedArgsAndFun (lib.sumTwoArgs (import ../os-specific/linux/kernel/generic.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools;
@@ -5650,14 +5818,14 @@ let
 
   klibc = makeOverridable (import ../os-specific/linux/klibc) {
     inherit fetchurl stdenv perl bison mktemp;
-    kernelHeaders = glibc.kernelHeaders;
+    linuxHeaders = glibc.kernelHeaders;
   };
 
   # Old version; needed in vmtools for insmod.  Should use
   # module_init_tools instead.
   klibc_15 = makeOverridable (import ../os-specific/linux/klibc/1.5.nix) {
     inherit fetchurl stdenv perl bison mktemp;
-    kernelHeaders = glibc.kernelHeaders;
+    linuxHeaders = glibc.kernelHeaders;
   };
 
   klibcShrunk = makeOverridable (import ../os-specific/linux/klibc/shrunk.nix) {
@@ -5668,17 +5836,17 @@ let
 
   kvm76 = import ../os-specific/linux/kvm/76.nix {
     inherit fetchurl stdenv zlib e2fsprogs SDL alsaLib pkgconfig rsync;
-    inherit (glibc) kernelHeaders;
+    linuxHeaders = glibc.kernelHeaders;
   };
 
   kvm86 = import ../os-specific/linux/kvm/86.nix {
     inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
-    inherit (glibc) kernelHeaders;
+    linuxHeaders = glibc.kernelHeaders;
   };
 
   kvm88 = import ../os-specific/linux/kvm/88.nix {
     inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
-    inherit (glibc) kernelHeaders;
+    linuxHeaders = glibc.kernelHeaders;
   };
 
   libcap = import ../os-specific/linux/libcap {
@@ -5772,7 +5940,7 @@ let
   };
 
   pam_unix2 = import ../os-specific/linux/pam_unix2 {
-    inherit stdenv fetchurl pam libxcrypt;
+    inherit stdenv fetchurl pam;
   };
 
   pcmciaUtils = composedArgsAndFun (import ../os-specific/linux/pcmciautils) {
@@ -5884,6 +6052,20 @@ let
     inherit (xlibs) libX11 xproto;
   };*/
 
+  uboot = makeOverridable (import ../misc/uboot) {
+    inherit fetchurl stdenv unzip;
+  };
+
+  uclibc = import ../os-specific/linux/uclibc {
+    inherit fetchurl stdenv linuxHeaders;
+  };
+
+  uclibcCross = target: import ../os-specific/linux/uclibc {
+    inherit fetchurl stdenv;
+    linuxHeaders = linuxHeadersCross target;
+    gccCross = gccCrossStageStatic target;
+  };
+
   udev = makeOverridable (import ../os-specific/linux/udev) {
     inherit fetchurl stdenv gperf pkgconfig acl libusb usbutils pciutils glib;
   };
@@ -5894,7 +6076,7 @@ let
   };
 
   umlutilities = import ../os-specific/linux/uml-utilities {
-    inherit fetchurl kernelHeaders stdenv readline lib;
+    inherit fetchurl linuxHeaders stdenv readline lib;
     tunctl = true; mconsole = true;
   };
 
@@ -6205,14 +6387,12 @@ let
   };
 
   autopanosiftc = import ../applications/graphics/autopanosiftc {
-    inherit fetchurl cmake libpng libtiff libjpeg panotools libxml2;
-    stdenv = overrideGCC stdenv gcc43_wrapper2;
+    inherit fetchurl stdenv cmake libpng libtiff libjpeg panotools libxml2;
   };
 
   avidemux = import ../applications/video/avidemux {
-    inherit fetchurl cmake pkgconfig libxml2 qt4 gettext SDL libxslt x264
+    inherit fetchurl stdenv cmake pkgconfig libxml2 qt4 gettext SDL libxslt x264
       alsaLib lame faac faad2 libvorbis;
-    stdenv = overrideGCC stdenv gcc43_wrapper2;
     inherit (gtkLibs) gtk;
     inherit (xlibs) libXv pixman libpthreadstubs libXau libXdmcp;
   };
@@ -6743,8 +6923,7 @@ let
   };
 
   freepv = import ../applications/graphics/freepv {
-    inherit fetchurl mesa freeglut libjpeg zlib cmake libxml2 libpng;
-    stdenv = overrideGCC stdenv gcc43_wrapper2;
+    inherit fetchurl stdenv mesa freeglut libjpeg zlib cmake libxml2 libpng;
     inherit (xlibs) libX11 libXxf86vm;
   };
 
@@ -6903,13 +7082,12 @@ let
   };
 
   hugin = import ../applications/graphics/hugin {
-    inherit fetchurl cmake panotools libtiff libpng boost pkgconfig
+    inherit fetchurl stdenv cmake panotools libtiff libpng boost pkgconfig
       exiv2 gettext ilmbase enblendenfuse autopanosiftc mesa freeglut
       glew;
     inherit wxGTK;
     inherit (xlibs) libXi libXmu;
     openexr = openexr_1_6_1;
-    stdenv = overrideGCC stdenv gcc43_wrapper2;
   };
 
   i810switch = import ../applications/misc/i810 {
@@ -7021,8 +7199,9 @@ let
   };
 
   kbasket = import ../applications/misc/kbasket {
-    inherit stdenv fetchurl kdelibs x11 zlib libpng libjpeg
+    inherit fetchurl kdelibs x11 zlib libpng libjpeg
       perl qt3 gpgme libgpgerror;
+    stdenv = overrideGCC stdenv gcc43;
   };
 
   kermit = import ../tools/misc/kermit {
@@ -7272,8 +7451,7 @@ let
   };
 
   paraview = import ../applications/graphics/paraview {
-    inherit fetchurl cmake qt4;
-    stdenv = overrideGCC stdenv gcc43_wrapper2;
+    inherit fetchurl stdenv cmake qt4;
   };
 
   partitionManager = import ../tools/misc/partition-manager {
@@ -8062,16 +8240,18 @@ let
 
     kdelibs = import ../desktops/kde-3/kdelibs {
       inherit
-        fetchurl stdenv xlibs zlib perl openssl pcre pkgconfig
+        fetchurl xlibs zlib perl openssl pcre pkgconfig
         libjpeg libpng libtiff libxml2 libxslt libtool
         expat freetype bzip2 cups attr acl;
+      stdenv = overrideGCC stdenv gcc43;
       qt = qt3;
     };
 
     kdebase = import ../desktops/kde-3/kdebase {
       inherit
-        fetchurl stdenv pkgconfig x11 xlibs zlib libpng libjpeg perl
+        fetchurl pkgconfig x11 xlibs zlib libpng libjpeg perl
         kdelibs openssl bzip2 fontconfig pam hal dbus glib;
+      stdenv = overrideGCC stdenv gcc43;
       qt = qt3;
     };
 
@@ -8380,7 +8560,7 @@ let
       inherit fetchurl stdenv perl curl bzip2 openssl src preConfigure automake
         autoconf libtool configureFlags enableScripts lib bison libxml2;
       flex = flex2533;
-      aterm = aterm242fixes;
+      aterm = aterm25;
       db4 = db45;
       inherit docbook5_xsl libxslt docbook5 docbook_xml_dtd_43 w3m;
     };
diff --git a/pkgs/top-level/platforms.nix b/pkgs/top-level/platforms.nix
new file mode 100644
index 00000000000..8664b6d5778
--- /dev/null
+++ b/pkgs/top-level/platforms.nix
@@ -0,0 +1,52 @@
+{ system, pkgs}:
+with pkgs;
+{
+  pc = assert system == "i686-linux" || system == "x86_64-linux"; {
+    name = "pc";
+    uboot = null;
+    kernelBaseConfig = "defconfig";
+    kernelExtraConfig =
+      ''
+        # Virtualisation (KVM, Xen...).
+        PARAVIRT_GUEST y
+        KVM_CLOCK y
+        KVM_GUEST y
+        XEN y
+        KSM y
+
+        # We need 64 GB (PAE) support for Xen guest support.
+        HIGHMEM64G? y
+      '';
+  };
+
+  sheevaplug = assert system == "armv5tel-linux"; {
+    name = "sheevaplug";
+    kernelBaseConfig = "kirkwood_defconfig";
+    kernelArch = "arm";
+    kernelExtraConfig =
+      ''
+        # Fail to build
+        DRM n
+        SCSI_ADVANSYS n
+        USB_ISP1362_HCD n
+        SND_SOC n
+        SND_ALI5451 n
+        FB_SAVAGE n
+        SCSI_NSP32 n
+        ATA_SFF n
+        SUNGEM n
+        IRDA n
+        ATM_HE n
+        SCSI_ACARD n
+        BLK_DEV_CMD640_ENHANCED n
+      '';
+    inherit uboot;
+  };
+
+  versatileARM = assert system == "armv5tel-linux"; {
+    name = "versatileARM";
+    kernelBaseConfig = "versatile_defconfig";
+    kernelArch = "arm";
+    uboot = null;
+  };
+}
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index c595b6cb65f..091022eed19 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -12,7 +12,7 @@ let
   prio = level: job: toJob job // { schedulingPriority = level; };
 
   toJob = x: if builtins.isAttrs x then x else
-    { type = "job"; systems = x; schedulingPriority = 10; };
+    { type = "job"; systems = x; schedulingPriority = 5; };
 
   /* Perform a job on the given set of platforms.  The function `f' is
      called by Hydra for each platform, and should return some job
@@ -173,6 +173,7 @@ in {
   gcc43_multi = ["x86_64-linux"];
   gcc44 = linux;
   gcj44 = linux;
+  ghdl = linux;
   ghostscript = linux;
   ghostscriptX = linux;
   gimp = linux;
@@ -181,6 +182,7 @@ in {
   glibcLocales = linux;
   glxinfo = linux;
   gnash = linux;
+  gnat44 = linux;
   gnugrep = all;
   gnum4 = all;
   gnumake = all;