Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{lib, stdenv, fetchurl, openldap, perl}: 2 3stdenv.mkDerivation rec { 4 pname = "nss_ldap"; 5 version = "265"; 6 7 src = fetchurl { 8 url = "http://www.padl.com/download/nss_ldap-${version}.tar.gz"; 9 sha256 = "1a16q9p97d2blrj0h6vl1xr7dg7i4s8x8namipr79mshby84vdbp"; 10 }; 11 12 preConfigure = '' 13 patchShebangs ./vers_string 14 sed -i s,vers_string,./vers_string, Makefile* 15 substituteInPlace vers_string --replace "cvslib.pl" "./cvslib.pl" 16 ''; 17 18 patches = [ ./crashes.patch ]; 19 20 postPatch = '' 21 patch -p0 < ${./nss_ldap-265-glibc-2.16.patch} 22 ''; 23 24 preInstall = '' 25 installFlagsArray=(INST_UID=$(id -u) INST_GID=$(id -g) LIBC_VERS=2.5 NSS_VERS=2 NSS_LDAP_PATH_CONF=$out/etc/ldap.conf) 26 substituteInPlace Makefile \ 27 --replace '/usr$(libdir)' $TMPDIR \ 28 --replace 'install-data-local:' 'install-data-local-disabled:' 29 mkdir -p $out/etc 30 ''; 31 32 buildInputs = [ openldap perl ]; 33 34 meta = with lib; { 35 description = "LDAP module for the Solaris Nameservice Switch (NSS)"; 36 license = licenses.gpl2; 37 platforms = platforms.linux; 38 }; 39}