2021-01-11 10:54:33 +03:00
|
|
|
{ lib, stdenv, fetchurl
|
2021-01-17 06:51:22 +03:00
|
|
|
, pkg-config, makeWrapper, autoreconfHook
|
2022-04-26 16:34:31 +03:00
|
|
|
, openldap, python3, pam
|
2018-12-21 12:22:20 +03:00
|
|
|
}:
|
2012-09-14 02:06:25 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "nss-pam-ldapd";
|
2022-02-24 02:14:10 +03:00
|
|
|
version = "0.9.12";
|
2018-12-21 12:22:20 +03:00
|
|
|
|
2012-09-14 02:06:25 +04:00
|
|
|
src = fetchurl {
|
2019-08-15 15:41:18 +03:00
|
|
|
url = "https://arthurdejong.org/nss-pam-ldapd/${pname}-${version}.tar.gz";
|
2022-02-24 02:14:10 +03:00
|
|
|
sha256 = "sha256-xtZh50aTy/Uxp5BjHKk7c/KR+yPMOUZbCd642iv7DhQ=";
|
2012-09-14 02:06:25 +04:00
|
|
|
};
|
2018-12-21 12:22:20 +03:00
|
|
|
|
2021-01-17 06:51:22 +03:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper autoreconfHook ];
|
2022-04-26 16:34:31 +03:00
|
|
|
buildInputs = [ openldap pam python3 ];
|
2012-09-14 02:06:25 +04:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile.in --replace "install-data-local: " "# install-data-local: "
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-bindpw-file=/run/nslcd/bindpw"
|
|
|
|
"--with-nslcd-socket=/run/nslcd/socket"
|
|
|
|
"--with-nslcd-pidfile=/run/nslcd/nslcd.pid"
|
|
|
|
"--with-pam-seclib-dir=$(out)/lib/security"
|
2018-12-21 12:22:20 +03:00
|
|
|
"--enable-kerberos=no"
|
2012-09-14 02:06:25 +04:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/sbin/nslcd --prefix LD_LIBRARY_PATH ":" $out/lib
|
|
|
|
'';
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2012-09-14 02:06:25 +04:00
|
|
|
description = "LDAP identity and authentication for NSS/PAM";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://arthurdejong.org/nss-pam-ldapd/";
|
2022-02-24 02:14:10 +03:00
|
|
|
license = licenses.lgpl21Plus;
|
2016-08-02 20:50:55 +03:00
|
|
|
platforms = platforms.linux;
|
2012-09-14 02:06:25 +04:00
|
|
|
};
|
|
|
|
}
|