1{ stdenv, fetchurl, pam, openldap, perl }:
2
3stdenv.mkDerivation rec {
4 pname = "pam_ldap";
5 version = "186";
6
7 src = fetchurl {
8 url = "https://www.padl.com/download/pam_ldap-${version}.tar.gz";
9 sha256 = "0lv4f7hc02jrd2l3gqxd247qq62z11sp3fafn8lgb8ymb7aj5zn8";
10 };
11
12 postPatch = ''
13 patchShebangs ./vers_string
14 substituteInPlace vers_string --replace "cvslib.pl" "./cvslib.pl"
15 '';
16
17 preInstall = "
18 substituteInPlace Makefile --replace '-o root -g root' ''
19 ";
20
21 nativeBuildInputs = [ perl ];
22 buildInputs = [ pam openldap ];
23
24 meta = {
25 homepage = "https://www.padl.com/OSS/pam_ldap.html";
26 description = "LDAP backend for PAM";
27 longDescription = ''
28 The pam_ldap module provides the means for Solaris and Linux servers and
29 workstations to authenticate against LDAP directories, and to change their
30 passwords in the directory.'';
31 license = "LGPL";
32 inherit (pam.meta) platforms;
33 };
34}