2011-11-01 22:10:51 +00:00
|
|
|
# Packages that make up the GNU/Hurd operating system (aka. GNU).
|
|
|
|
|
|
|
|
args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
|
2015-06-01 14:28:05 +01:00
|
|
|
, texinfo, glibcCross, hurdPartedCross, libuuid, samba
|
2011-11-01 22:10:51 +00:00
|
|
|
, gccCrossStageStatic, gccCrossStageFinal
|
2012-12-28 18:42:10 +00:00
|
|
|
, forceNativeDrv, forceSystem, newScope, platform, config, crossSystem
|
2012-04-04 21:05:48 +01:00
|
|
|
, overrides ? {} }:
|
2011-11-01 22:10:51 +00:00
|
|
|
|
|
|
|
with args;
|
|
|
|
|
2012-04-04 21:25:51 +01:00
|
|
|
let
|
|
|
|
callPackage = newScope gnu;
|
|
|
|
|
|
|
|
gnu = {
|
2012-12-28 18:42:10 +00:00
|
|
|
hurdCross = forceNativeDrv (callPackage ./hurd {
|
2012-04-04 21:25:51 +01:00
|
|
|
inherit fetchgit stdenv autoconf libtool texinfo
|
|
|
|
glibcCross hurdPartedCross;
|
|
|
|
inherit (gnu) machHeaders mig;
|
2012-12-28 18:08:19 +00:00
|
|
|
libuuid = libuuid.crossDrv;
|
2012-04-04 21:25:51 +01:00
|
|
|
automake = automake111x;
|
|
|
|
headersOnly = false;
|
|
|
|
cross = assert crossSystem != null; crossSystem;
|
|
|
|
gccCross = gccCrossStageFinal;
|
|
|
|
});
|
|
|
|
|
2012-12-28 18:42:10 +00:00
|
|
|
hurdCrossIntermediate = forceNativeDrv (callPackage ./hurd {
|
2012-04-04 21:25:51 +01:00
|
|
|
inherit fetchgit stdenv autoconf libtool texinfo glibcCross;
|
|
|
|
inherit (gnu) machHeaders mig;
|
2012-04-06 14:18:58 +01:00
|
|
|
hurdPartedCross = null;
|
|
|
|
libuuid = null;
|
2012-04-04 21:25:51 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2012-12-28 18:42:10 +00:00
|
|
|
libpthreadCross = forceNativeDrv (callPackage ./libpthread {
|
2012-04-04 21:25:51 +01:00
|
|
|
inherit fetchgit stdenv autoconf automake libtool glibcCross;
|
|
|
|
inherit (gnu) machHeaders hurdHeaders;
|
|
|
|
hurd = gnu.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 {
|
|
|
|
# Build natively, but force use of a 32-bit environment because we're
|
|
|
|
# targeting `i586-pc-gnu'.
|
2014-03-19 08:57:21 +00:00
|
|
|
stdenv = (forceSystem "i686-linux" "i386").stdenv;
|
2012-04-04 21:25:51 +01:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:08:19 +00:00
|
|
|
# XXX: Use this one for its `.crossDrv'. Using the one above from
|
2012-04-04 21:25:51 +01:00
|
|
|
# `x86_64-linux' leads to building a different cross-toolchain because of
|
|
|
|
# the `forceSystem'.
|
|
|
|
mig_raw = callPackage ./mig {};
|
|
|
|
|
|
|
|
smbfs = callPackage ./smbfs {
|
2012-04-04 22:24:09 +01:00
|
|
|
hurd = gnu.hurdCross;
|
2012-04-04 21:25:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
unionfs = callPackage ./unionfs {
|
2012-04-04 22:24:09 +01:00
|
|
|
hurd = gnu.hurdCross;
|
2012-04-04 21:25:51 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2012-04-04 20:50:15 +01:00
|
|
|
# Allow callers to override elements of this attribute set.
|
2012-04-04 21:25:51 +01:00
|
|
|
// overrides;
|
|
|
|
|
|
|
|
in gnu # we trust!
|