Merge pull request #26419 from roblabla/feature-sasl

cyrus-sasl: Add saslauthd service and LDAP support
This commit is contained in:
Franz Pletz
2017-07-20 20:23:52 +02:00
committed by GitHub
3 changed files with 67 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, openssl, kerberos, db, gettext, pam, fixDarwinDylibNames, autoreconfHook }:
{ lib, stdenv, fetchurl, openssl, openldap, kerberos, db, gettext, pam, fixDarwinDylibNames, autoreconfHook, enableLdap ? false }:
with stdenv.lib;
stdenv.mkDerivation rec {
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
buildInputs =
[ openssl db gettext kerberos ]
++ lib.optional enableLdap openldap
++ lib.optional stdenv.isFreeBSD autoreconfHook
++ lib.optional stdenv.isLinux pam
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
@@ -29,12 +30,11 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-openssl=${openssl.dev}"
];
] ++ lib.optional enableLdap "--with-ldap=${openldap.dev}";
# Set this variable at build-time to make sure $out can be evaluated.
preConfigure = ''
configureFlagsArray=( --with-plugindir=$out/lib/sasl2
--with-configdir=$out/lib/sasl2
--with-saslauthd=/run/saslauthd
--enable-login
)