forked from mirrors/nixpkgs
Merge pull request #62888 from ajs124/exim_mysql_fix
exim: Fix build with MariaDB
This commit is contained in:
commit
bd5a8797cc
|
@ -16,12 +16,11 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ coreutils db openssl perl pcre ]
|
||||
++ stdenv.lib.optional enableLDAP openldap
|
||||
++ stdenv.lib.optionals enableMySQL [ mysql zlib ]
|
||||
++ stdenv.lib.optionals enableMySQL [ mysql.connector-c zlib ]
|
||||
++ stdenv.lib.optional enableAuthDovecot dovecot
|
||||
++ stdenv.lib.optional enablePAM pam;
|
||||
|
||||
preBuild = ''
|
||||
${stdenv.lib.optionalString enableMySQL "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${mysql}/share/mysql/pkgconfig/"}
|
||||
sed '
|
||||
s:^\(BIN_DIRECTORY\)=.*:\1='"$out"'/bin:
|
||||
s:^\(CONFIGURE_FILE\)=.*:\1=/etc/exim.conf:
|
||||
|
@ -52,10 +51,10 @@ stdenv.mkDerivation rec {
|
|||
''}
|
||||
${stdenv.lib.optionalString enableMySQL ''
|
||||
s:^# \(LOOKUP_MYSQL=yes\)$:\1:
|
||||
s:^# \(LOOKUP_MYSQL_PC=mariadb\)$:\1:
|
||||
s:^\(LOOKUP_LIBS\)=\(.*\):\1=\2 -lmysqlclient:
|
||||
s:^# \(LOOKUP_LIBS\)=.*:\1=-lmysqlclient:
|
||||
s:^# \(LOOKUP_INCLUDE\)=.*:\1=-I${mysql}/include/mysql/:
|
||||
s:^# \(LOOKUP_MYSQL_PC=mysql.connector-c\)$:\1:
|
||||
s:^\(LOOKUP_LIBS\)=\(.*\):\1=\2 -lmysqlclient -L${mysql.connector-c}/lib/mysql -lssl -ldl -lm -lpthread -lz:
|
||||
s:^# \(LOOKUP_LIBS\)=.*:\1=-lmysqlclient -L${mysql.connector-c}/lib/mysql -lssl -ldl -lm -lpthread -lz:
|
||||
s:^# \(LOOKUP_INCLUDE\)=.*:\1=-I${mysql.connector-c}/include/mysql/:
|
||||
''}
|
||||
${stdenv.lib.optionalString enableAuthDovecot ''
|
||||
s:^# \(AUTH_DOVECOT\)=.*:\1=yes:
|
||||
|
|
Loading…
Reference in a new issue