Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exim: add optional support for PAM #46744

Merged
merged 1 commit into from
Sep 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pkgs/servers/mail/exim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, enableLDAP ? false, openldap
, enableMySQL ? false, mysql, zlib
, enableAuthDovecot ? false, dovecot
, enablePAM ? false, pam
}:

stdenv.mkDerivation rec {
Expand All @@ -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/"}
Expand Down Expand Up @@ -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
Expand Down