diff options
author | Alexander Rezvov <rezvov@majordomo.ru> | 2021-07-14 22:57:17 +0300 |
---|---|---|
committer | Alexander Rezvov <rezvov@majordomo.ru> | 2021-07-14 22:57:17 +0300 |
commit | 9fd1126cd4fc1ad1a8f9f9135c61a984ef0a33f3 (patch) | |
tree | 7ddc6c8789cc49e3c7dd6374d4168a247bb03eb3 /pkgs/servers/mail/exim | |
parent | d75b67bfa4bb2dd7abad55a79426788ba2628f9f (diff) |
exim: add redis lookup support
Diffstat (limited to 'pkgs/servers/mail/exim')
-rw-r--r-- | pkgs/servers/mail/exim/default.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/servers/mail/exim/default.nix b/pkgs/servers/mail/exim/default.nix index 122d00c5f0a7..702808f950a2 100644 --- a/pkgs/servers/mail/exim/default.nix +++ b/pkgs/servers/mail/exim/default.nix @@ -5,6 +5,7 @@ , enablePAM ? false, pam , enableSPF ? true, libspf2 , enableDMARC ? true, opendmarc +, enableRedis ? false, hiredis }: stdenv.mkDerivation rec { @@ -23,7 +24,8 @@ stdenv.mkDerivation rec { ++ lib.optional enableAuthDovecot dovecot ++ lib.optional enablePAM pam ++ lib.optional enableSPF libspf2 - ++ lib.optional enableDMARC opendmarc; + ++ lib.optional enableDMARC opendmarc + ++ lib.optional enableRedis hiredis; preBuild = '' sed ' @@ -78,6 +80,13 @@ stdenv.mkDerivation rec { s:^# \(SUPPORT_DMARC\)=.*:\1=yes: s:^# \(LDFLAGS += -lopendmarc\):\1: ''} + ${lib.optionalString enableRedis '' + s:^# \(LOOKUP_REDIS=yes\)$:\1: + s:^\(LOOKUP_LIBS\)=\(.*\):\1=\2 -lhiredis -L${hiredis}/lib/hiredis: + s:^# \(LOOKUP_LIBS\)=.*:\1=-lhiredis -L${hiredis}/lib/hiredis: + s:^\(LOOKUP_INCLUDE\)=\(.*\):\1=\2 -I${hiredis}/include/hiredis/: + s:^# \(LOOKUP_INCLUDE\)=.*:\1=-I${hiredis}/include/hiredis/: + ''} #/^\s*#.*/d #/^\s*$/d ' < src/EDITME > Local/Makefile |