nixpkgs-suyu/pkgs/servers/ldap/389/default.nix

68 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, doxygen, perl, pam, nspr, nss, openldap
, db, cyrus_sasl, svrcore, icu, net_snmp, kerberos, pcre, perlPackages, libevent, openssl, python
2014-12-30 18:30:15 +01:00
}:
2014-12-30 18:30:15 +01:00
stdenv.mkDerivation rec {
pname = "389-ds-base";
version = "1.3.9.1";
2014-12-30 18:30:15 +01:00
src = fetchurl {
url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.bz2";
sha256 = "141iv1phgk1lw74sfjj3v7wy6qs0q56lvclwv2p0hqn1wg8ic4q6";
2014-12-30 18:30:15 +01:00
};
nativeBuildInputs = [ autoreconfHook pkgconfig doxygen ];
2014-12-30 18:30:15 +01:00
buildInputs = [
perl pam nspr nss openldap db cyrus_sasl svrcore icu
net_snmp kerberos pcre libevent openssl python
2015-01-10 00:01:01 +01:00
] ++ (with perlPackages; [ MozillaLdap NetAddrIP DBFile ]);
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";
})
];
postPatch = ''
substituteInPlace Makefile.am \
--replace 's,@perlpath\@,$(perldir),g' 's,@perlpath\@,$(perldir) $(PERLPATH),g'
'';
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"
"--with-openldap"
"--with-db"
"--with-db-inc=${db.dev}/include"
"--with-db-lib=${db.out}/lib"
"--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
enableParallelBuilding = true;
2015-01-09 20:05:12 +01:00
2015-04-17 23:09:41 +02:00
installFlags = [
"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;
2014-12-30 18:30:15 +01:00
meta = with stdenv.lib; {
homepage = "https://www.port389.org/";
description = "Enterprise-class Open Source LDAP server for Linux";
license = licenses.gpl3Plus;
2014-12-30 18:30:15 +01:00
platforms = platforms.linux;
};
}