mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
postfix: Add optional LDAP support
This commit is contained in:
parent
048114eb4f
commit
f1094050fd
@ -3,6 +3,7 @@
|
||||
, withPgSQL ? false, postgresql
|
||||
, withMySQL ? false, libmysql
|
||||
, withSQLite ? false, sqlite
|
||||
, withLDAP ? false, openldap
|
||||
}:
|
||||
|
||||
let
|
||||
@ -11,12 +12,14 @@ let
|
||||
"-DHAS_DB_BYPASS_MAKEDEFS_CHECK"
|
||||
] ++ lib.optional withPgSQL "-DHAS_PGSQL"
|
||||
++ lib.optionals withMySQL [ "-DHAS_MYSQL" "-I${lib.getDev libmysql}/include/mysql" ]
|
||||
++ lib.optional withSQLite "-DHAS_SQLITE");
|
||||
++ lib.optional withSQLite "-DHAS_SQLITE"
|
||||
++ lib.optional withLDAP "-DHAS_LDAP");
|
||||
auxlibs = lib.concatStringsSep " " ([
|
||||
"-ldb" "-lnsl" "-lresolv" "-lsasl2" "-lcrypto" "-lssl"
|
||||
] ++ lib.optional withPgSQL "-lpq"
|
||||
++ lib.optional withMySQL "-lmysqlclient"
|
||||
++ lib.optional withSQLite "-lsqlite3");
|
||||
++ lib.optional withSQLite "-lsqlite3"
|
||||
++ lib.optional withLDAP "-lldap");
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
|
||||
@ -32,7 +35,8 @@ in stdenv.mkDerivation rec {
|
||||
buildInputs = [ makeWrapper gnused db openssl cyrus_sasl icu pcre ]
|
||||
++ lib.optional withPgSQL postgresql
|
||||
++ lib.optional withMySQL libmysql
|
||||
++ lib.optional withSQLite sqlite;
|
||||
++ lib.optional withSQLite sqlite
|
||||
++ lib.optional withLDAP openldap;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
hardeningEnable = [ "pie" ];
|
||||
|
Loading…
Reference in New Issue
Block a user