2016-11-10 02:49:22 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, perl, pam, nspr, nss, openldap
|
|
|
|
, db, cyrus_sasl, svrcore, icu, net_snmp, kerberos, pcre, perlPackages
|
2014-12-30 17:30:15 +00:00
|
|
|
}:
|
2015-01-09 23:01:01 +00:00
|
|
|
let
|
2016-09-24 19:16:27 +01:00
|
|
|
version = "1.3.5.4";
|
2015-01-09 23:01:01 +00:00
|
|
|
in
|
2014-12-30 17:30:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-01-09 23:01:01 +00:00
|
|
|
name = "389-ds-base-${version}";
|
2014-12-30 17:30:15 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://directory.fedoraproject.org/binaries/${name}.tar.bz2";
|
2016-09-24 19:16:27 +01:00
|
|
|
sha256 = "1f1r4wky8x39jdabnd277f6m0snnzh9f0wvsr8x4rnvkckjphbx8";
|
2014-12-30 17:30:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pkgconfig perl pam nspr nss openldap db cyrus_sasl svrcore icu
|
2015-06-01 20:33:51 +01:00
|
|
|
net_snmp kerberos pcre
|
2015-01-09 23:01:01 +00:00
|
|
|
] ++ (with perlPackages; [ MozillaLdap NetAddrIP DBFile ]);
|
|
|
|
|
|
|
|
# TODO: Fix bin/ds-logpipe.py, bin/logconv, bin/cl-dump
|
2014-12-30 17:30:15 +00:00
|
|
|
|
2016-11-10 02:49:22 +00:00
|
|
|
patches = [ ./perl-path.patch
|
|
|
|
# https://fedorahosted.org/389/ticket/48354
|
|
|
|
(fetchpatch {
|
|
|
|
name = "389-ds-base-CVE-2016-5416.patch";
|
|
|
|
url = "https://fedorahosted.org/389/changeset/3c2cd48b7d2cb0579f7de6d460bcd0c9bb1157bd/?format=diff&new=3c2cd48b7d2cb0579f7de6d460bcd0c9bb1157bd";
|
|
|
|
addPrefixes = true;
|
|
|
|
sha256 = "1kv3a3di1cihkaf8xdbb5mzvhm4c3frx8rc5mji8xgjyj9ni6xja";
|
|
|
|
})
|
|
|
|
];
|
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 16:36:00 +01:00
|
|
|
"--with-openldap"
|
2014-12-30 17:30:15 +00:00
|
|
|
"--with-db=${db}"
|
2016-04-16 17:48:19 +01:00
|
|
|
"--with-sasl=${cyrus_sasl.dev}"
|
2014-12-30 17:30:15 +00:00
|
|
|
"--with-netsnmp=${net_snmp}"
|
|
|
|
];
|
|
|
|
|
2015-01-09 19:05:12 +00:00
|
|
|
preInstall = ''
|
|
|
|
# The makefile doesn't create this directory for whatever reason
|
|
|
|
mkdir -p $out/lib/dirsrv
|
|
|
|
'';
|
|
|
|
|
2015-04-17 22:09:41 +01:00
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
];
|
|
|
|
|
2015-01-09 23:01:01 +00:00
|
|
|
passthru.version = version;
|
|
|
|
|
2014-12-30 17:30:15 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://directory.fedoraproject.org/;
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "Enterprise-class Open Source LDAP server for Linux";
|
2014-12-30 17:30:15 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ wkennington ];
|
|
|
|
};
|
|
|
|
}
|