From 2be82bc6eb7e12c6070e980559962d1108837967 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 16 Sep 2018 16:38:23 +0200 Subject: [PATCH] exim: add optional support for PAM --- pkgs/servers/mail/exim/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/mail/exim/default.nix b/pkgs/servers/mail/exim/default.nix index 3acf777999f747..cf68b1bef40d98 100644 --- a/pkgs/servers/mail/exim/default.nix +++ b/pkgs/servers/mail/exim/default.nix @@ -2,6 +2,7 @@ , enableLDAP ? false, openldap , enableMySQL ? false, mysql, zlib , enableAuthDovecot ? false, dovecot +, enablePAM ? false, pam }: stdenv.mkDerivation rec { @@ -16,7 +17,8 @@ stdenv.mkDerivation rec { buildInputs = [ coreutils db openssl perl pcre ] ++ stdenv.lib.optional enableLDAP openldap ++ stdenv.lib.optionals enableMySQL [ mysql zlib ] - ++ stdenv.lib.optional enableAuthDovecot dovecot; + ++ stdenv.lib.optional enableAuthDovecot dovecot + ++ stdenv.lib.optional enablePAM pam; preBuild = '' ${stdenv.lib.optionalString enableMySQL "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${mysql}/share/mysql/pkgconfig/"} @@ -57,6 +59,11 @@ stdenv.mkDerivation rec { ${stdenv.lib.optionalString enableAuthDovecot '' s:^# \(AUTH_DOVECOT\)=.*:\1=yes: ''} + ${stdenv.lib.optionalString enablePAM '' + s:^# \(SUPPORT_PAM\)=.*:\1=yes: + s:^\(EXTRALIBS_EXIM\)=\(.*\):\1=\2 -lpam: + s:^# \(EXTRALIBS_EXIM\)=.*:\1=-lpam: + ''} #/^\s*#.*/d #/^\s*$/d ' < src/EDITME > Local/Makefile