Move GNU/Hurd package attributes under `os-specific/gnu/default.nix'.
svn path=/nixpkgs/trunk/; revision=30173
This commit is contained in:
parent
08b5baee9a
commit
0f6979f5b9
|
@ -5,7 +5,7 @@ cross :
|
||||||
|
|
||||||
{ name, fetchurl, stdenv, installLocales ? false
|
{ name, fetchurl, stdenv, installLocales ? false
|
||||||
, gccCross ? null, kernelHeaders ? null
|
, gccCross ? null, kernelHeaders ? null
|
||||||
, machHeaders ? null, hurdHeaders ? null, hurdLibpthreadHeaders ? null
|
, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null
|
||||||
, mig ? null, fetchgit ? null
|
, mig ? null, fetchgit ? null
|
||||||
, profilingLibraries ? false, meta
|
, profilingLibraries ? false, meta
|
||||||
, preConfigure ? "", ... }@args :
|
, preConfigure ? "", ... }@args :
|
||||||
|
@ -32,7 +32,7 @@ assert (cross != null) -> (gccCross != null);
|
||||||
|
|
||||||
assert (mig != null) -> (machHeaders != null);
|
assert (mig != null) -> (machHeaders != null);
|
||||||
assert (machHeaders != null) -> (hurdHeaders != null);
|
assert (machHeaders != null) -> (hurdHeaders != null);
|
||||||
assert (hurdHeaders != null) -> (hurdLibpthreadHeaders != null);
|
assert (hurdHeaders != null) -> (libpthreadHeaders != null);
|
||||||
assert (hurdHeaders != null) -> (fetchgit != null);
|
assert (hurdHeaders != null) -> (fetchgit != null);
|
||||||
|
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
|
@ -201,7 +201,7 @@ stdenv.mkDerivation ({
|
||||||
# Work around the fact that the configure snippet that looks for
|
# Work around the fact that the configure snippet that looks for
|
||||||
# <hurd/version.h> does not honor `--with-headers=$sysheaders' and that
|
# <hurd/version.h> does not honor `--with-headers=$sysheaders' and that
|
||||||
# glibc expects Mach, Hurd, and pthread headers to be in the same place.
|
# glibc expects Mach, Hurd, and pthread headers to be in the same place.
|
||||||
CPATH = "${hurdHeaders}/include:${machHeaders}/include:${hurdLibpthreadHeaders}/include";
|
CPATH = "${hurdHeaders}/include:${machHeaders}/include:${libpthreadHeaders}/include";
|
||||||
|
|
||||||
# `fetchgit' is a function and thus should not be passed to the
|
# `fetchgit' is a function and thus should not be passed to the
|
||||||
# `derivation' primitive.
|
# `derivation' primitive.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, fetchurl, kernelHeaders
|
{ stdenv, fetchurl, kernelHeaders
|
||||||
, machHeaders ? null, hurdHeaders ? null, hurdLibpthreadHeaders ? null
|
, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null
|
||||||
, mig ? null, fetchgit ? null
|
, mig ? null, fetchgit ? null
|
||||||
, installLocales ? true
|
, installLocales ? true
|
||||||
, profilingLibraries ? false
|
, profilingLibraries ? false
|
||||||
|
@ -41,9 +41,9 @@ in
|
||||||
|
|
||||||
(if hurdHeaders != null
|
(if hurdHeaders != null
|
||||||
then rec {
|
then rec {
|
||||||
inherit machHeaders hurdHeaders hurdLibpthreadHeaders mig fetchgit;
|
inherit machHeaders hurdHeaders libpthreadHeaders mig fetchgit;
|
||||||
|
|
||||||
propagatedBuildInputs = [ machHeaders hurdHeaders hurdLibpthreadHeaders ];
|
propagatedBuildInputs = [ machHeaders hurdHeaders libpthreadHeaders ];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
# When building GCC itself `propagatedBuildInputs' above is not
|
# When building GCC itself `propagatedBuildInputs' above is not
|
||||||
|
|
|
@ -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 { });
|
||||||
|
}
|
|
@ -1118,14 +1118,14 @@ let
|
||||||
|
|
||||||
patchutils = callPackage ../tools/text/patchutils { };
|
patchutils = callPackage ../tools/text/patchutils { };
|
||||||
|
|
||||||
parted = callPackage ../tools/misc/parted { };
|
parted = callPackage ../tools/misc/parted { hurd = null; };
|
||||||
parted_2_3 = callPackage ../tools/misc/parted/2.3.nix { };
|
parted_2_3 = callPackage ../tools/misc/parted/2.3.nix { hurd = null; };
|
||||||
|
|
||||||
hurdPartedCross =
|
hurdPartedCross =
|
||||||
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
|
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
|
||||||
then (callPackage ../tools/misc/parted {
|
then (callPackage ../tools/misc/parted {
|
||||||
# Needs the Hurd's libstore.
|
# Needs the Hurd's libstore.
|
||||||
hurd = hurdCrossIntermediate;
|
hurd = gnu.hurdCrossIntermediate;
|
||||||
|
|
||||||
# The Hurd wants a libparted.a.
|
# The Hurd wants a libparted.a.
|
||||||
enableStatic = true;
|
enableStatic = true;
|
||||||
|
@ -1808,7 +1808,7 @@ let
|
||||||
libpthreadCross =
|
libpthreadCross =
|
||||||
# FIXME: Don't explicitly refer to `i586-pc-gnu'.
|
# FIXME: Don't explicitly refer to `i586-pc-gnu'.
|
||||||
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
|
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
|
||||||
then hurdLibpthreadCross
|
then gnu.libpthreadCross
|
||||||
else null;
|
else null;
|
||||||
});
|
});
|
||||||
libc = libcCross;
|
libc = libcCross;
|
||||||
|
@ -2928,21 +2928,6 @@ let
|
||||||
|
|
||||||
ltrace = callPackage ../development/tools/misc/ltrace { };
|
ltrace = callPackage ../development/tools/misc/ltrace { };
|
||||||
|
|
||||||
mig = callPackage ../os-specific/gnu/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 ./all-packages.nix ({ inherit config; } // args);
|
|
||||||
inherit platform;
|
|
||||||
}).stdenv;
|
|
||||||
}
|
|
||||||
else { });
|
|
||||||
|
|
||||||
mk = callPackage ../development/tools/build-managers/mk { };
|
mk = callPackage ../development/tools/build-managers/mk { };
|
||||||
|
|
||||||
noweb = callPackage ../development/tools/literate-programming/noweb { };
|
noweb = callPackage ../development/tools/literate-programming/noweb { };
|
||||||
|
@ -3426,7 +3411,7 @@ let
|
||||||
in ({
|
in ({
|
||||||
inherit stdenv fetchurl;
|
inherit stdenv fetchurl;
|
||||||
gccCross = gccCrossStageStatic;
|
gccCross = gccCrossStageStatic;
|
||||||
kernelHeaders = if crossGNU then hurdHeaders else linuxHeadersCross;
|
kernelHeaders = if crossGNU then gnu.hurdHeaders else linuxHeadersCross;
|
||||||
installLocales = getConfig [ "glibc" "locales" ] false;
|
installLocales = getConfig [ "glibc" "locales" ] false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3434,7 +3419,8 @@ let
|
||||||
|
|
||||||
(if crossGNU
|
(if crossGNU
|
||||||
then {
|
then {
|
||||||
inherit machHeaders hurdHeaders hurdLibpthreadHeaders mig fetchgit;
|
inherit (gnu) machHeaders hurdHeaders libpthreadHeaders mig;
|
||||||
|
inherit fetchgit;
|
||||||
}
|
}
|
||||||
else { }))));
|
else { }))));
|
||||||
|
|
||||||
|
@ -5185,55 +5171,10 @@ let
|
||||||
|
|
||||||
htop = callPackage ../os-specific/linux/htop { };
|
htop = callPackage ../os-specific/linux/htop { };
|
||||||
|
|
||||||
hurdCross = forceBuildDrv(import ../os-specific/gnu/hurd {
|
# GNU/Hurd core packages.
|
||||||
inherit fetchgit stdenv autoconf libtool texinfo machHeaders
|
gnu = recurseIntoAttrs (callPackage ../os-specific/gnu {
|
||||||
mig glibcCross hurdPartedCross;
|
callPackage = newScope pkgs.gnu;
|
||||||
libuuid = libuuid.hostDrv;
|
inherit platform crossSystem;
|
||||||
automake = automake111x;
|
|
||||||
headersOnly = false;
|
|
||||||
cross = assert crossSystem != null; crossSystem;
|
|
||||||
gccCross = gccCrossStageFinal;
|
|
||||||
});
|
|
||||||
|
|
||||||
hurdCrossIntermediate = forceBuildDrv(import ../os-specific/gnu/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 ../os-specific/gnu/hurd {
|
|
||||||
automake = automake111x;
|
|
||||||
headersOnly = true;
|
|
||||||
gccCross = null;
|
|
||||||
glibcCross = null;
|
|
||||||
libuuid = null;
|
|
||||||
hurdPartedCross = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
hurdLibpthreadHeaders = callPackage ../os-specific/gnu/libpthread {
|
|
||||||
headersOnly = true;
|
|
||||||
hurd = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
hurdLibpthreadCross = forceBuildDrv(import ../os-specific/gnu/libpthread {
|
|
||||||
inherit fetchgit stdenv autoconf automake libtool
|
|
||||||
machHeaders hurdHeaders glibcCross;
|
|
||||||
hurd = hurdCrossIntermediate;
|
|
||||||
gccCross = gccCrossStageStatic;
|
|
||||||
cross = assert crossSystem != null; crossSystem;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
hwdata = callPackage ../os-specific/linux/hwdata { };
|
hwdata = callPackage ../os-specific/linux/hwdata { };
|
||||||
|
@ -5879,18 +5820,6 @@ let
|
||||||
|
|
||||||
lvm2 = callPackage ../os-specific/linux/lvm2 { };
|
lvm2 = callPackage ../os-specific/linux/lvm2 { };
|
||||||
|
|
||||||
# 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 ../os-specific/gnu/mach {
|
|
||||||
automake = automake111x; };
|
|
||||||
|
|
||||||
machHeaders = callPackage ../os-specific/gnu/mach {
|
|
||||||
automake = automake111x;
|
|
||||||
headersOnly = true;
|
|
||||||
mig = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
mdadm = callPackage ../os-specific/linux/mdadm { };
|
mdadm = callPackage ../os-specific/linux/mdadm { };
|
||||||
|
|
||||||
mingetty = callPackage ../os-specific/linux/mingetty { };
|
mingetty = callPackage ../os-specific/linux/mingetty { };
|
||||||
|
|
Loading…
Reference in New Issue