git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #33665 from 4z3/exim-ldap

exim: add optional LDAP support

commit1c696c4edf911d08ee84ce90157d65850a445489 authorFranz Pletz <fpletz@fnordicwalking.de> dateSat 10 Feb 2018, 19:25 (9 years ago) parent03eef8107eb3a2
1 file changed+10−2
pkgs/servers/mail/exim/default.nix+10−2
pkgs/servers/mail/exim/default.nix+10−2
@@ -1,4 +1,6 @@
1−{ coreutils, fetchurl, db, openssl, pcre, perl, pkgconfig, stdenv }:
1+{ coreutils, db, fetchurl, openldap, openssl, pcre, perl, pkgconfig, stdenv
2+, enableLDAP ? false
3+}:
24
35stdenv.mkDerivation rec {
46 name = "exim-4.90";
@@ -9,7 +11,8 @@ stdenv.mkDerivation rec {
911 };
1012
1113 nativeBuildInputs = [ pkgconfig ];
12− buildInputs = [ coreutils db openssl pcre perl ];
14+ buildInputs = [ coreutils db openssl pcre perl ]
15+ ++ stdenv.lib.optional enableLDAP openldap;
1316
1417 preBuild = ''
1518 sed '
@@ -33,6 +36,11 @@ stdenv.mkDerivation rec {
3336 s:^# \(RM_COMMAND\)=.*:\1=${coreutils}/bin/rm:
3437 s:^# \(TOUCH_COMMAND\)=.*:\1=${coreutils}/bin/touch:
3538 s:^# \(PERL_COMMAND\)=.*:\1=${perl}/bin/perl:
39+ ${stdenv.lib.optionalString enableLDAP ''
40+ s:^# \(LDAP_LIB_TYPE=OPENLDAP2\)$:\1:
41+ s:^# \(LOOKUP_LDAP=yes\)$:\1:
42+ s:^# \(LOOKUP_LIBS\)=.*:\1=-lldap:
43+ ''}
3644 #/^\s*#.*/d
3745 #/^\s*$/d
3846 ' < src/EDITME > Local/Makefile