2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, doxygen, perl, pam, nspr, nss, openldap
|
2021-03-14 16:11:48 +00:00
|
|
|
, db, cyrus_sasl, svrcore, icu, net-snmp, libkrb5, pcre, perlPackages, libevent, openssl, python3
|
2014-12-30 17:30:15 +00:00
|
|
|
}:
|
2019-05-21 09:09:31 +00:00
|
|
|
|
2014-12-30 17:30:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-21 09:09:31 +00:00
|
|
|
pname = "389-ds-base";
|
|
|
|
version = "1.3.9.1";
|
2014-12-30 17:30:15 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-05-21 09:09:31 +00:00
|
|
|
url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.bz2";
|
|
|
|
sha256 = "141iv1phgk1lw74sfjj3v7wy6qs0q56lvclwv2p0hqn1wg8ic4q6";
|
2014-12-30 17:30:15 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config doxygen ];
|
2014-12-30 17:30:15 +00:00
|
|
|
buildInputs = [
|
2017-09-14 19:24:37 +00:00
|
|
|
perl pam nspr nss openldap db cyrus_sasl svrcore icu
|
2021-03-14 16:11:48 +00:00
|
|
|
net-snmp libkrb5 pcre libevent openssl python3
|
2015-01-09 23:01:01 +00:00
|
|
|
] ++ (with perlPackages; [ MozillaLdap NetAddrIP DBFile ]);
|
|
|
|
|
2019-05-21 09:09:31 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "389-ds-nss.patch";
|
|
|
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/nss.patch?h=389-ds-base&id=b80ed52cc65ff9b1d72f8ebc54dbd462b12f6be9";
|
|
|
|
sha256 = "07z7jl9z4gzhk3k6qyfn558xl76js8041llyr5n99h20ckkbwagk";
|
|
|
|
})
|
2016-11-10 02:49:22 +00:00
|
|
|
];
|
2019-05-21 09:09:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.am \
|
|
|
|
--replace 's,@perlpath\@,$(perldir),g' 's,@perlpath\@,$(perldir) $(PERLPATH),g'
|
|
|
|
'';
|
2015-01-09 23:01:01 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# Create perl paths for library imports in perl scripts
|
|
|
|
PERLPATH=""
|
|
|
|
for P in $(echo $PERL5LIB | sed 's/:/ /g'); do
|
|
|
|
PERLPATH="$PERLPATH $(echo $P/*/*)"
|
|
|
|
done
|
|
|
|
export PERLPATH
|
|
|
|
'';
|
2015-01-09 19:05:12 +00:00
|
|
|
|
2014-12-30 17:30:15 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
2015-01-09 19:05:12 +00:00
|
|
|
"--localstatedir=/var"
|
2016-04-17 15:36:00 +00:00
|
|
|
"--with-openldap"
|
2018-05-22 13:47:28 +00:00
|
|
|
"--with-db"
|
|
|
|
"--with-db-inc=${db.dev}/include"
|
|
|
|
"--with-db-lib=${db.out}/lib"
|
2016-04-16 16:48:19 +00:00
|
|
|
"--with-sasl=${cyrus_sasl.dev}"
|
2019-12-21 22:44:50 +00:00
|
|
|
"--with-netsnmp=yes"
|
2021-01-15 07:07:56 +00:00
|
|
|
"--with-netsnmp-inc=${lib.getDev net-snmp}/include"
|
|
|
|
"--with-netsnmp-lib=${lib.getLib net-snmp}/lib"
|
2014-12-30 17:30:15 +00:00
|
|
|
];
|
2017-02-05 21:40:28 +00:00
|
|
|
|
2019-05-21 09:09:31 +00:00
|
|
|
enableParallelBuilding = true;
|
2015-01-09 19:05:12 +00:00
|
|
|
|
2015-04-17 21:09:41 +00:00
|
|
|
installFlags = [
|
2019-05-21 09:09:31 +00:00
|
|
|
"sysconfdir=${placeholder "out"}/etc"
|
|
|
|
"localstatedir=${placeholder "TMPDIR"}"
|
2015-04-17 21:09:41 +00:00
|
|
|
];
|
|
|
|
|
2015-01-09 23:01:01 +00:00
|
|
|
passthru.version = version;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-05-21 09:09:31 +00:00
|
|
|
homepage = "https://www.port389.org/";
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "Enterprise-class Open Source LDAP server for Linux";
|
2019-05-21 09:09:31 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2014-12-30 17:30:15 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|