mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 11:30:35 +08:00
exim: add optional support for PAM (#46744)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user