forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
39 lines
1 KiB
Nix
39 lines
1 KiB
Nix
{lib, 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*
|
|
substituteInPlace vers_string --replace "cvslib.pl" "./cvslib.pl"
|
|
'';
|
|
|
|
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 ];
|
|
|
|
meta = with lib; {
|
|
description = "LDAP module for the Solaris Nameservice Switch (NSS)";
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|