2008-07-08 01:11:53 +02:00
|
|
|
{ stdenv, fetchurl, kernelHeaders
|
|
|
|
, installLocales ? true
|
|
|
|
, profilingLibraries ? false
|
|
|
|
}:
|
|
|
|
|
2008-10-07 18:55:20 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2008-12-10 12:06:23 +01:00
|
|
|
name = "glibc-2.9";
|
2008-10-07 18:55:20 +02:00
|
|
|
|
2008-07-08 01:11:53 +02:00
|
|
|
builder = ./builder.sh;
|
2008-10-07 18:55:20 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2008-12-10 12:06:23 +01:00
|
|
|
url = http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2;
|
|
|
|
sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h";
|
2008-07-08 01:11:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit kernelHeaders installLocales;
|
|
|
|
|
|
|
|
inherit (stdenv) is64bit;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
/* Fix for NIXPKGS-79: when doing host name lookups, when
|
|
|
|
nsswitch.conf contains a line like
|
|
|
|
|
|
|
|
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
|
|
|
|
|
|
|
|
don't return an error when mdns4_minimal can't be found. This
|
|
|
|
is a bug in Glibc: when a service can't be found, NSS should
|
|
|
|
continue to the next service unless "UNAVAIL=return" is set.
|
|
|
|
("NOTFOUND=return" refers to the service returning a NOTFOUND
|
|
|
|
error, not the service itself not being found.) The reason is
|
|
|
|
that the "status" variable (while initialised to UNAVAIL) is
|
|
|
|
outside of the loop that iterates over the services, the
|
|
|
|
"files" service sets status to NOTFOUND. So when the call to
|
|
|
|
find "mdns4_minimal" fails, "status" will still be NOTFOUND,
|
|
|
|
and it will return instead of continuing to "dns". Thus, the
|
|
|
|
line
|
|
|
|
|
|
|
|
hosts: mdns4_minimal [NOTFOUND=return] dns mdns4
|
|
|
|
|
|
|
|
does work because "status" will contain UNAVAIL after the
|
|
|
|
failure to find mdns4_minimal. */
|
|
|
|
./nss-skip-unavail.patch
|
2009-04-19 17:28:37 +02:00
|
|
|
|
|
|
|
/* Make it possible to override the locale-archive in NixOS. */
|
2009-04-19 18:07:00 +02:00
|
|
|
./locale-override.patch
|
2009-04-22 14:55:47 +02:00
|
|
|
|
|
|
|
/* Have rpcgen(1) look for cpp(1) in $PATH. */
|
|
|
|
./rpcgen-path.patch
|
2008-07-08 01:11:53 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
# `--with-tls --without-__thread' enables support for TLS but causes
|
|
|
|
# it not to be used. Required if we don't want to barf on 2.4
|
|
|
|
# kernels. Or something.
|
2008-10-07 18:55:20 +02:00
|
|
|
configureFlags = ''
|
|
|
|
--enable-add-ons
|
2008-07-08 01:11:53 +02:00
|
|
|
--with-headers=${kernelHeaders}/include
|
2008-10-07 18:55:20 +02:00
|
|
|
${if profilingLibraries then "--enable-profile" else "--disable-profile"}
|
|
|
|
'';
|
2008-07-08 01:11:53 +02:00
|
|
|
|
|
|
|
# Workaround for this bug:
|
|
|
|
# http://sourceware.org/bugzilla/show_bug.cgi?id=411
|
|
|
|
# I.e. when gcc is compiled with --with-arch=i686, then the
|
|
|
|
# preprocessor symbol `__i686' will be defined to `1'. This causes
|
|
|
|
# the symbol __i686.get_pc_thunk.dx to be mangled.
|
|
|
|
NIX_CFLAGS_COMPILE = "-U__i686";
|
2008-10-07 18:55:20 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.gnu.org/software/libc/;
|
|
|
|
description = "The GNU C Library";
|
|
|
|
};
|
2008-07-08 01:11:53 +02:00
|
|
|
}
|