2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, perl, pam, nspr, nss, openldap
|
2016-11-10 03:49:22 +01:00
|
|
|
, db, cyrus_sasl, svrcore, icu, net_snmp, kerberos, pcre, perlPackages
|
2014-12-30 18:30:15 +01:00
|
|
|
}:
|
2015-01-10 00:01:01 +01:00
|
|
|
let
|
2017-08-20 22:22:59 +02:00
|
|
|
version = "1.3.5.19";
|
2015-01-10 00:01:01 +01:00
|
|
|
in
|
2014-12-30 18:30:15 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-01-10 00:01:01 +01:00
|
|
|
name = "389-ds-base-${version}";
|
2014-12-30 18:30:15 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://directory.fedoraproject.org/binaries/${name}.tar.bz2";
|
2017-08-20 22:22:59 +02:00
|
|
|
sha256 = "1r1n44xfvy51r4r1180dfmjziyj3pqxwmnv6rjvvvjjm87fslmdd";
|
2014-12-30 18:30:15 +01:00
|
|
|
};
|
|
|
|
|
2017-09-14 21:24:37 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2014-12-30 18:30:15 +01:00
|
|
|
buildInputs = [
|
2017-09-14 21:24:37 +02:00
|
|
|
perl pam nspr nss openldap db cyrus_sasl svrcore icu
|
2015-06-01 21:33:51 +02:00
|
|
|
net_snmp kerberos pcre
|
2015-01-10 00:01:01 +01:00
|
|
|
] ++ (with perlPackages; [ MozillaLdap NetAddrIP DBFile ]);
|
|
|
|
|
|
|
|
# TODO: Fix bin/ds-logpipe.py, bin/logconv, bin/cl-dump
|
2014-12-30 18:30:15 +01:00
|
|
|
|
2016-11-10 03:49:22 +01:00
|
|
|
patches = [ ./perl-path.patch
|
|
|
|
];
|
2015-01-10 00:01:01 +01: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 20:05:12 +01:00
|
|
|
|
2014-12-30 18:30:15 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
2015-01-09 20:05:12 +01:00
|
|
|
"--localstatedir=/var"
|
2016-04-17 17:36:00 +02:00
|
|
|
"--with-openldap"
|
2018-05-22 15:47:28 +02:00
|
|
|
"--with-db"
|
|
|
|
"--with-db-inc=${db.dev}/include"
|
|
|
|
"--with-db-lib=${db.out}/lib"
|
2016-04-16 18:48:19 +02:00
|
|
|
"--with-sasl=${cyrus_sasl.dev}"
|
2014-12-30 18:30:15 +01:00
|
|
|
"--with-netsnmp=${net_snmp}"
|
|
|
|
];
|
2017-02-05 22:40:28 +01:00
|
|
|
|
2015-01-09 20:05:12 +01:00
|
|
|
preInstall = ''
|
|
|
|
# The makefile doesn't create this directory for whatever reason
|
|
|
|
mkdir -p $out/lib/dirsrv
|
|
|
|
'';
|
|
|
|
|
2015-04-17 23:09:41 +02:00
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
];
|
|
|
|
|
2015-01-10 00:01:01 +01:00
|
|
|
passthru.version = version;
|
|
|
|
|
2014-12-30 18:30:15 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-10-26 23:42:06 +02:00
|
|
|
homepage = http://www.port389.org/;
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Enterprise-class Open Source LDAP server for Linux";
|
2014-12-30 18:30:15 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|