anchor.diff:          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
  
positive.code:     ++ lib.optional enableAuthDovecot dovecot
      ++ lib.optional enablePAM pam
      ++ lib.optional enableSPF libspf2
      ++ lib.optional enableDMARC opendmarc;
  
    preBuild = ''
      sed '
  
negative.code: , enablePAM ? false, pam
  , enableSPF ? true, libspf2
  , enableDMARC ? true, opendmarc
  , enableRedis ? false, hiredis
  }:
  
  stdenv.mkDerivation rec {
  