mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
glibc: Get the Hurd-specific glibc branch.
svn path=/nixpkgs/trunk/; revision=21761
This commit is contained in:
parent
a07de1d9b1
commit
7a34b3a7a9
@ -5,14 +5,21 @@ cross :
|
||||
|
||||
{ name, fetchurl, stdenv, installLocales ? false
|
||||
, gccCross ? null, kernelHeaders ? null
|
||||
, machHeaders ? null, hurdHeaders ? null, mig ? null
|
||||
, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null
|
||||
, profilingLibraries ? false, meta
|
||||
, preConfigure ? "", ... }@args :
|
||||
|
||||
let version = "2.11.1"; in
|
||||
let
|
||||
rev = "df4c3faf0ccc848b5a8086c222bdb42679a9798f";
|
||||
version = if hurdHeaders != null then "0.0-pre" + rev else "2.11.1";
|
||||
in
|
||||
|
||||
assert (cross != null) -> (gccCross != null);
|
||||
|
||||
assert (mig != null) -> (machHeaders != null);
|
||||
assert (machHeaders != null) -> (hurdHeaders != null);
|
||||
assert (hurdHeaders != null) -> (fetchgit != null);
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
inherit kernelHeaders installLocales;
|
||||
|
||||
@ -21,7 +28,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
patches = [
|
||||
patches =
|
||||
stdenv.lib.optional (fetchgit == null)
|
||||
/* Fix for NIXPKGS-79: when doing host name lookups, when
|
||||
nsswitch.conf contains a line like
|
||||
|
||||
@ -45,6 +53,7 @@ stdenv.mkDerivation ({
|
||||
failure to find mdns4_minimal. */
|
||||
./nss-skip-unavail.patch
|
||||
|
||||
++ [
|
||||
/* Make it possible to override the locale-archive in NixOS. */
|
||||
./locale-override.patch
|
||||
|
||||
@ -53,10 +62,11 @@ stdenv.mkDerivation ({
|
||||
|
||||
/* Make sure `nscd' et al. are linked against `libssp'. */
|
||||
./stack-protector-link.patch
|
||||
]
|
||||
|
||||
++ stdenv.lib.optional (fetchgit == null)
|
||||
/* MOD_NANO definition, for ntp (taken from glibc upstream) */
|
||||
./mod_nano.patch
|
||||
];
|
||||
./mod_nano.patch;
|
||||
|
||||
configureFlags = [
|
||||
"-C"
|
||||
@ -100,10 +110,20 @@ stdenv.mkDerivation ({
|
||||
name = name + "-${version}" +
|
||||
stdenv.lib.optionalString (cross != null) "-${cross.config}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/glibc/glibc-${version}.tar.bz2";
|
||||
sha256 = "18azb6518ryqhkfmddr25p0h1s2msrmx7dblij58sjlnzh61vq34";
|
||||
};
|
||||
src =
|
||||
if hurdHeaders != null
|
||||
then fetchgit {
|
||||
# Shamefully the "official" glibc won't build on GNU, so use the one
|
||||
# maintained by the Hurd folks, `tschwinge/Roger_Whittaker' branch.
|
||||
# See <http://www.gnu.org/software/hurd/source_repositories/glibc.html>.
|
||||
url = "git://git.sv.gnu.org/hurd/glibc.git";
|
||||
sha256 = "f3590a54a9d897d121f91113949edbaaf3e30cdeacbb8d0a44de7b6564f6643e";
|
||||
inherit rev;
|
||||
}
|
||||
else fetchurl {
|
||||
url = "mirror://gnu/glibc/glibc-${version}.tar.bz2";
|
||||
sha256 = "18azb6518ryqhkfmddr25p0h1s2msrmx7dblij58sjlnzh61vq34";
|
||||
};
|
||||
|
||||
srcPorts = fetchurl {
|
||||
url = "mirror://gnu/glibc/glibc-ports-2.11.tar.bz2";
|
||||
@ -155,11 +175,15 @@ stdenv.mkDerivation ({
|
||||
|
||||
//
|
||||
|
||||
(if (cross != null && cross.config == "i586-pc-gnu")
|
||||
(if hurdHeaders != null
|
||||
then {
|
||||
# Work around the fact that the configure snippet that looks for
|
||||
# <hurd/version.h> does not honor `--with-headers=$sysheaders' and that
|
||||
# glibc expects both Mach and Hurd headers to be in the same place.
|
||||
CPATH = "${hurdHeaders}/include:${machHeaders}/include";
|
||||
|
||||
# `fetchgit' is a function and thus should not be passed to the
|
||||
# `derivation' primitive.
|
||||
fetchgit = null;
|
||||
}
|
||||
else { }))
|
||||
|
@ -1,14 +1,11 @@
|
||||
{ stdenv, fetchurl, kernelHeaders
|
||||
, machHeaders ? null, hurdHeaders ? null
|
||||
, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null
|
||||
, installLocales ? true
|
||||
, profilingLibraries ? false
|
||||
, gccCross ? null
|
||||
, mig ? null
|
||||
}:
|
||||
|
||||
assert stdenv.gcc.gcc != null;
|
||||
assert (mig != null) -> (machHeaders != null);
|
||||
assert (machHeaders != null) -> (hurdHeaders != null);
|
||||
|
||||
let
|
||||
build = import ./common.nix;
|
||||
@ -42,7 +39,7 @@ in
|
||||
//
|
||||
|
||||
(if hurdHeaders != null
|
||||
then { inherit machHeaders hurdHeaders mig; }
|
||||
then { inherit machHeaders hurdHeaders mig fetchgit; }
|
||||
else { })
|
||||
|
||||
//
|
||||
|
@ -3913,7 +3913,10 @@ let
|
||||
//
|
||||
|
||||
(if crossGNU
|
||||
then { inherit machHeaders hurdHeaders; mig = migCross; }
|
||||
then {
|
||||
inherit machHeaders hurdHeaders fetchgit;
|
||||
mig = migCross;
|
||||
}
|
||||
else { }))));
|
||||
|
||||
glibcCross = glibc211Cross;
|
||||
|
Loading…
Reference in New Issue
Block a user