2021-06-12 05:40:02 +02:00
|
|
|
{ stdenv
|
|
|
|
, autoreconfHook
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
|
|
|
|
, bzip2
|
|
|
|
, cmocka
|
|
|
|
, cracklib
|
|
|
|
, cyrus_sasl
|
|
|
|
, db
|
|
|
|
, doxygen
|
|
|
|
, icu
|
|
|
|
, libevent
|
|
|
|
, libkrb5
|
|
|
|
, lm_sensors
|
|
|
|
, net-snmp
|
|
|
|
, nspr
|
|
|
|
, nss
|
|
|
|
, openldap
|
|
|
|
, openssl
|
|
|
|
, pcre
|
|
|
|
, perl
|
|
|
|
, perlPackages
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, svrcore
|
|
|
|
, zlib
|
|
|
|
|
|
|
|
, enablePamPassthru ? true
|
|
|
|
, pam
|
|
|
|
|
|
|
|
, enableCockpit ? true
|
|
|
|
, rsync
|
|
|
|
|
|
|
|
, enableDna ? true
|
|
|
|
, enableLdapi ? true
|
|
|
|
, enableAutobind ? false
|
|
|
|
, enableAutoDnSuffix ? false
|
|
|
|
, enableBitwise ? true
|
|
|
|
, enableAcctPolicy ? true
|
|
|
|
, enablePosixWinsync ? true
|
2014-12-30 18:30:15 +01:00
|
|
|
}:
|
2019-05-21 11:09:31 +02:00
|
|
|
|
2014-12-30 18:30:15 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-21 11:09:31 +02:00
|
|
|
pname = "389-ds-base";
|
2021-06-26 20:55:11 +02:00
|
|
|
version = "2.0.6";
|
2014-12-30 18:30:15 +01:00
|
|
|
|
2021-06-12 05:40:02 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "389ds";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
2021-06-26 20:55:11 +02:00
|
|
|
sha256 = "sha256-MYLRrH3PrNdPVuRffiG39zzJK6eHJcvIDWn1q0IHrZ8=";
|
2014-12-30 18:30:15 +01:00
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config doxygen ];
|
2021-06-12 05:40:02 +02:00
|
|
|
|
2014-12-30 18:30:15 +01:00
|
|
|
buildInputs = [
|
2021-06-12 05:40:02 +02:00
|
|
|
bzip2
|
|
|
|
cracklib
|
|
|
|
cyrus_sasl
|
|
|
|
db
|
|
|
|
icu
|
|
|
|
libevent
|
|
|
|
libkrb5
|
|
|
|
lm_sensors
|
|
|
|
net-snmp
|
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
openldap
|
|
|
|
openssl
|
|
|
|
pcre
|
|
|
|
perl
|
|
|
|
python3
|
|
|
|
svrcore
|
|
|
|
zlib
|
|
|
|
|
|
|
|
# tests
|
|
|
|
cmocka
|
|
|
|
libevent
|
|
|
|
|
|
|
|
# lib389
|
|
|
|
(python3.withPackages (ps: with ps; [
|
|
|
|
setuptools
|
|
|
|
ldap
|
|
|
|
six
|
|
|
|
pyasn1
|
|
|
|
pyasn1-modules
|
2021-07-03 13:37:24 +02:00
|
|
|
python-dateutil
|
2021-06-12 05:40:02 +02:00
|
|
|
argcomplete
|
|
|
|
libselinux
|
|
|
|
]))
|
|
|
|
|
|
|
|
# logconv.pl
|
|
|
|
perlPackages.DBFile
|
|
|
|
perlPackages.ArchiveTar
|
|
|
|
]
|
|
|
|
++ lib.optional enableCockpit rsync
|
|
|
|
++ lib.optional enablePamPassthru pam;
|
|
|
|
|
2019-05-21 11:09:31 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.am \
|
|
|
|
--replace 's,@perlpath\@,$(perldir),g' 's,@perlpath\@,$(perldir) $(PERLPATH),g'
|
2021-06-12 05:40:02 +02:00
|
|
|
|
|
|
|
patchShebangs ./buildnum.py ./ldap/servers/slapd/mkDBErrStrs.py
|
2019-05-21 11:09:31 +02:00
|
|
|
'';
|
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
|
|
|
|
2021-06-12 05:40:02 +02:00
|
|
|
configureFlags =
|
|
|
|
let
|
|
|
|
mkEnable = cond: name: if cond then "--enable-${name}" else "--disable-${name}";
|
|
|
|
in
|
|
|
|
[
|
|
|
|
"--enable-cmocka"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--with-db-inc=${db.dev}/include"
|
|
|
|
"--with-db-lib=${db.out}/lib"
|
|
|
|
"--with-db=yes"
|
|
|
|
"--with-netsnmp-inc=${lib.getDev net-snmp}/include"
|
|
|
|
"--with-netsnmp-lib=${lib.getLib net-snmp}/lib"
|
|
|
|
"--with-netsnmp=yes"
|
|
|
|
"--with-openldap"
|
|
|
|
|
|
|
|
"${mkEnable enableCockpit "cockpit"}"
|
|
|
|
"${mkEnable enablePamPassthru "pam-passthru"}"
|
|
|
|
"${mkEnable enableDna "dna"}"
|
|
|
|
"${mkEnable enableLdapi "ldapi"}"
|
|
|
|
"${mkEnable enableAutobind "autobind"}"
|
|
|
|
"${mkEnable enableAutoDnSuffix "auto-dn-suffix"}"
|
|
|
|
"${mkEnable enableBitwise "bitwise"}"
|
|
|
|
"${mkEnable enableAcctPolicy "acctpolicy"}"
|
|
|
|
"${mkEnable enablePosixWinsync "posix-winsync"}"
|
|
|
|
];
|
2017-02-05 22:40:28 +01:00
|
|
|
|
2019-05-21 11:09:31 +02:00
|
|
|
enableParallelBuilding = true;
|
2015-01-09 20:05:12 +01:00
|
|
|
|
2021-06-12 05:40:02 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
2015-04-17 23:09:41 +02:00
|
|
|
installFlags = [
|
2019-05-21 11:09:31 +02:00
|
|
|
"sysconfdir=${placeholder "out"}/etc"
|
|
|
|
"localstatedir=${placeholder "TMPDIR"}"
|
2015-04-17 23:09:41 +02:00
|
|
|
];
|
|
|
|
|
2015-01-10 00:01:01 +01:00
|
|
|
passthru.version = version;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-05-21 11:09:31 +02:00
|
|
|
homepage = "https://www.port389.org/";
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Enterprise-class Open Source LDAP server for Linux";
|
2019-05-21 11:09:31 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2014-12-30 18:30:15 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|