diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-11-01 22:10:51 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-11-01 22:10:51 +0000 |
commit | 0f6979f5b9dbb9db0b5ea605b40025f96346ab90 (patch) | |
tree | 15b978feeb11cff4395ed03728314decb80d7330 /pkgs/os-specific/gnu/default.nix | |
parent | 08b5baee9af963841973d98218590a5246715ebd (diff) | |
download | nixlib-0f6979f5b9dbb9db0b5ea605b40025f96346ab90.tar nixlib-0f6979f5b9dbb9db0b5ea605b40025f96346ab90.tar.gz nixlib-0f6979f5b9dbb9db0b5ea605b40025f96346ab90.tar.bz2 nixlib-0f6979f5b9dbb9db0b5ea605b40025f96346ab90.tar.lz nixlib-0f6979f5b9dbb9db0b5ea605b40025f96346ab90.tar.xz nixlib-0f6979f5b9dbb9db0b5ea605b40025f96346ab90.tar.zst nixlib-0f6979f5b9dbb9db0b5ea605b40025f96346ab90.zip |
Move GNU/Hurd package attributes under `os-specific/gnu/default.nix'.
svn path=/nixpkgs/trunk/; revision=30173
Diffstat (limited to 'pkgs/os-specific/gnu/default.nix')
-rw-r--r-- | pkgs/os-specific/gnu/default.nix | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/pkgs/os-specific/gnu/default.nix b/pkgs/os-specific/gnu/default.nix new file mode 100644 index 000000000000..3978979d7020 --- /dev/null +++ b/pkgs/os-specific/gnu/default.nix @@ -0,0 +1,89 @@ +# Packages that make up the GNU/Hurd operating system (aka. GNU). + +args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool +, texinfo, glibcCross, hurdPartedCross, libuuid +, gccCrossStageStatic, gccCrossStageFinal +, forceBuildDrv, callPackage, platform, config, crossSystem }: + +with args; + +rec { + hurdCross = forceBuildDrv(import ./hurd { + inherit fetchgit stdenv autoconf libtool texinfo machHeaders + mig glibcCross hurdPartedCross; + libuuid = libuuid.hostDrv; + automake = automake111x; + headersOnly = false; + cross = assert crossSystem != null; crossSystem; + gccCross = gccCrossStageFinal; + }); + + hurdCrossIntermediate = forceBuildDrv(import ./hurd { + inherit fetchgit stdenv autoconf libtool texinfo machHeaders + mig glibcCross; + automake = automake111x; + headersOnly = false; + cross = assert crossSystem != null; crossSystem; + + # The "final" GCC needs glibc and the Hurd libraries (libpthread in + # particular) so we first need an intermediate Hurd built with the + # intermediate GCC. + gccCross = gccCrossStageStatic; + + # This intermediate Hurd is only needed to build libpthread, which needs + # libihash, and to build Parted, which needs libstore and + # libshouldbeinlibc. + buildTarget = "libihash libstore libshouldbeinlibc"; + installTarget = "libihash-install libstore-install libshouldbeinlibc-install"; + }); + + hurdHeaders = callPackage ./hurd { + automake = automake111x; + headersOnly = true; + gccCross = null; + glibcCross = null; + libuuid = null; + hurdPartedCross = null; + }; + + libpthreadHeaders = callPackage ./libpthread { + headersOnly = true; + hurd = null; + }; + + libpthreadCross = forceBuildDrv(import ./libpthread { + inherit fetchgit stdenv autoconf automake libtool + machHeaders hurdHeaders glibcCross; + hurd = hurdCrossIntermediate; + gccCross = gccCrossStageStatic; + cross = assert crossSystem != null; crossSystem; + }); + + # In theory GNU Mach doesn't have to be cross-compiled. However, since it + # has to be built for i586 (it doesn't work on x86_64), one needs a cross + # compiler for that host. + mach = callPackage ./mach { + automake = automake111x; + }; + + machHeaders = callPackage ./mach { + automake = automake111x; + headersOnly = true; + mig = null; + }; + + mig = callPackage ./mig + (if stdenv.isLinux + then { + # Build natively, but force use of a 32-bit environment because we're + # targeting `i586-pc-gnu'. + stdenv = (import ../../stdenv { + system = "i686-linux"; + stdenvType = "i686-linux"; + allPackages = args: + import ../../top-level/all-packages.nix ({ inherit config; } // args); + inherit platform; + }).stdenv; + } + else { }); +} |