@@ -1,27 +1,33 @@
1−{ stdenv, fetchurl, pkgconfig, perl, pam, nspr, nss, openldap
2−, db, cyrus_sasl, svrcore, icu, net_snmp, kerberos, pcre, perlPackages
1+{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, doxygen, perl, pam, nspr, nss, openldap
2+, db, cyrus_sasl, svrcore, icu, net_snmp, kerberos, pcre, perlPackages, libevent, openssl, python
33}:
4−let
5− version = "1.3.5.19";
6−in
4+
75stdenv.mkDerivation rec {
8− name = "389-ds-base-${version}";
6+ pname = "389-ds-base";
7+ version = "1.3.9.1";
98
109 src = fetchurl {
11− url = "http://directory.fedoraproject.org/binaries/${name}.tar.bz2";
12− sha256 = "1r1n44xfvy51r4r1180dfmjziyj3pqxwmnv6rjvvvjjm87fslmdd";
10+ url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.bz2";
11+ sha256 = "141iv1phgk1lw74sfjj3v7wy6qs0q56lvclwv2p0hqn1wg8ic4q6";
1312 };
1413
15− nativeBuildInputs = [ pkgconfig ];
14+ nativeBuildInputs = [ autoreconfHook pkgconfig doxygen ];
1615 buildInputs = [
1716 perl pam nspr nss openldap db cyrus_sasl svrcore icu
18− net_snmp kerberos pcre
17+ net_snmp kerberos pcre libevent openssl python
1918 ] ++ (with perlPackages; [ MozillaLdap NetAddrIP DBFile ]);
2019
21− # TODO: Fix bin/ds-logpipe.py, bin/logconv, bin/cl-dump
22−
23− patches = [ ./perl-path.patch
20+ patches = [
21+ (fetchpatch {
22+ name = "389-ds-nss.patch";
23+ url = "https://aur.archlinux.org/cgit/aur.git/plain/nss.patch?h=389-ds-base&id=b80ed52cc65ff9b1d72f8ebc54dbd462b12f6be9";
24+ sha256 = "07z7jl9z4gzhk3k6qyfn558xl76js8041llyr5n99h20ckkbwagk";
25+ })
2426 ];
27+ postPatch = ''
28+ substituteInPlace Makefile.am \
29+ --replace 's,@perlpath\@,$(perldir),g' 's,@perlpath\@,$(perldir) $(PERLPATH),g'
30+ '';
2531
2632 preConfigure = ''
2733 # Create perl paths for library imports in perl scripts
@@ -43,22 +49,19 @@ stdenv.mkDerivation rec {
4349 "--with-netsnmp=${net_snmp}"
4450 ];
4551
46− preInstall = ''
47− # The makefile doesn't create this directory for whatever reason
48− mkdir -p $out/lib/dirsrv
49− '';
52+ enableParallelBuilding = true;
5053
5154 installFlags = [
52− "sysconfdir=\${out}/etc"
53− "localstatedir=\${TMPDIR}"
55+ "sysconfdir=${placeholder "out"}/etc"
56+ "localstatedir=${placeholder "TMPDIR"}"
5457 ];
5558
5659 passthru.version = version;
5760
5861 meta = with stdenv.lib; {
59− homepage = http://www.port389.org/;
62+ homepage = "https://www.port389.org/";
6063 description = "Enterprise-class Open Source LDAP server for Linux";
61− license = licenses.gpl2;
64+ license = licenses.gpl3Plus;
6265 platforms = platforms.linux;
6366 };
6467}