1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/os-specific/linux/nss_ldap/default.nix
Lluís Batlle i Rossell e459464ec1 nss_ldap: fixing crash with glibc >= 2.16
I update it to the latest version, 265. Then I use some patches:

The nss_ldap-265-glibc-2.16.patch is the one that fixes the crash.
The crashes.patch is another one that I took from RH that said to fixes somes
crashes, but it didn't fix the crash I was seeing. But I guess it fixes
something.
2013-05-17 10:23:37 +02:00

32 lines
814 B
Nix

{stdenv, fetchurl, openldap, perl}:
stdenv.mkDerivation {
name = "nss_ldap-265";
src = fetchurl {
url = http://www.padl.com/download/nss_ldap-265.tar.gz;
sha256 = "1a16q9p97d2blrj0h6vl1xr7dg7i4s8x8namipr79mshby84vdbp";
};
preConfigure = ''
patchShebangs ./vers_string
sed -i s,vers_string,./vers_string, Makefile*
'';
patches = [ ./crashes.patch ];
postPatch = ''
patch -p0 < ${./nss_ldap-265-glibc-2.16.patch}
'';
preInstall = ''
installFlagsArray=(INST_UID=$(id -u) INST_GID=$(id -g) LIBC_VERS=2.5 NSS_VERS=2 NSS_LDAP_PATH_CONF=$out/etc/ldap.conf)
substituteInPlace Makefile \
--replace '/usr$(libdir)' $TMPDIR \
--replace 'install-data-local:' 'install-data-local-disabled:'
mkdir -p $out/etc
'';
buildInputs = [ openldap perl ];
}