mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 02:42:59 +00:00
php: clean up mysql/mariadb handling
This commit is contained in:
parent
1f4c02fc9e
commit
48464d620d
@ -12,9 +12,8 @@ let
|
||||
{ version, sha256 }:
|
||||
|
||||
let php7 = lib.versionAtLeast version "7.0";
|
||||
mysqlHeaders = mysql.connector-c or mysql;
|
||||
mysqlndSupport = config.php.mysqlnd or false;
|
||||
mysqlBuildInputs = lib.optional (!mysqlndSupport) mysqlHeaders;
|
||||
mysqlBuildInputs = lib.optional (!mysqlndSupport) mysql.connector-c;
|
||||
|
||||
in composableDerivation.composableDerivation {} (fixed: {
|
||||
|
||||
@ -121,7 +120,7 @@ let
|
||||
};
|
||||
|
||||
mysqli = {
|
||||
configureFlags = ["--with-mysqli=${if mysqlndSupport then "mysqlnd" else "${mysqlHeaders}/bin/mysql_config"}"];
|
||||
configureFlags = ["--with-mysqli=${if mysqlndSupport then "mysqlnd" else "${mysql.connector-c}/bin/mysql_config"}"];
|
||||
buildInputs = mysqlBuildInputs;
|
||||
};
|
||||
|
||||
@ -132,7 +131,7 @@ let
|
||||
};
|
||||
|
||||
pdo_mysql = {
|
||||
configureFlags = ["--with-pdo-mysql=${if mysqlndSupport then "mysqlnd" else mysqlHeaders}"];
|
||||
configureFlags = ["--with-pdo-mysql=${if mysqlndSupport then "mysqlnd" else mysql.connector-c}"];
|
||||
buildInputs = mysqlBuildInputs;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user