2020 clucene_core_2 ,
2121 icu75 ,
2222 libexttextcat ,
23- openldap ,
2423 libsodium ,
2524 libstemmer ,
2625 cyrus_sasl ,
3029 libtirpc ,
3130 withApparmor ? false ,
3231 libapparmor ,
32+ withLDAP ? true ,
33+ openldap ,
3334 withUnwind ? false ,
3435 libunwind ,
3536 # Auth modules
@@ -65,7 +66,6 @@ stdenv.mkDerivation rec {
6566 clucene_core_2
6667 icu75
6768 libexttextcat
68- openldap
6969 libsodium
7070 libstemmer
7171 cyrus_sasl . dev
@@ -78,6 +78,7 @@ stdenv.mkDerivation rec {
7878 ]
7979 ++ lib . optional ( stdenv . hostPlatform . isLinux && ! stdenv . hostPlatform . isDarwin ) libtirpc
8080 ++ lib . optional withApparmor libapparmor
81+ ++ lib . optional withLDAP openldap
8182 ++ lib . optional withUnwind libunwind
8283 ++ lib . optional withMySQL libmysqlclient
8384 ++ lib . optional withPgSQL libpq
@@ -142,12 +143,10 @@ stdenv.mkDerivation rec {
142143 # We need this so utilities default to reading /etc/dovecot/dovecot.conf file.
143144 "--sysconfdir=/etc"
144145 "--with-moduledir=${ placeholder "out" } /lib/dovecot/modules"
145- "--with-ldap"
146146 "--with-ssl=openssl"
147147 "--with-zlib"
148148 "--with-bzlib"
149149 "--with-lz4"
150- "--with-ldap"
151150 "--with-lucene"
152151 "--with-icu"
153152 "--with-textcat"
@@ -170,10 +169,11 @@ stdenv.mkDerivation rec {
170169 ]
171170 ++ lib . optional stdenv . hostPlatform . isLinux "--with-systemd"
172171 ++ lib . optional stdenv . hostPlatform . isDarwin "--enable-static"
172+ ++ lib . optional withLDAP "--with-ldap"
173+ ++ lib . optional withLua "--with-lua"
173174 ++ lib . optional withMySQL "--with-mysql"
174175 ++ lib . optional withPgSQL "--with-pgsql"
175- ++ lib . optional withSQLite "--with-sqlite"
176- ++ lib . optional withLua "--with-lua" ;
176+ ++ lib . optional withSQLite "--with-sqlite" ;
177177
178178 doCheck = ! stdenv . hostPlatform . isDarwin ;
179179
0 commit comments