summary refs log tree commit diff
path: root/pkgs/os-specific/linux/pam_ldap/default.nix
blob: 988256808dbb88e8a259a8085c8fe7de241b9f33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl, pam, openldap, perl }:

stdenv.mkDerivation rec {
  pname = "pam_ldap";
  version = "186";

  src = fetchurl {
    url = "https://www.padl.com/download/pam_ldap-${version}.tar.gz";
    sha256 = "0lv4f7hc02jrd2l3gqxd247qq62z11sp3fafn8lgb8ymb7aj5zn8";
  };

  postPatch = ''
    patchShebangs ./vers_string
    substituteInPlace vers_string --replace "cvslib.pl" "./cvslib.pl"
  '';

  preInstall = "
    substituteInPlace Makefile --replace '-o root -g root' ''
  ";

  nativeBuildInputs = [ perl ];
  buildInputs = [ pam openldap ];

  meta = {
    homepage = "https://www.padl.com/OSS/pam_ldap.html";
    description = "LDAP backend for PAM";
    longDescription = ''
      The pam_ldap module provides the means for Solaris and Linux servers and
      workstations to authenticate against LDAP directories, and to change their
      passwords in the directory.'';
    license = "LGPL";
    inherit (pam.meta) platforms;
  };
}