php: add config.php.mysqlnd option

This commit is contained in:
John Boehr 2017-11-02 18:49:20 -07:00
parent 240b4f36a6
commit 41cd4f2459
No known key found for this signature in database
GPG Key ID: 73B8EFB60708F699

View File

@ -11,6 +11,8 @@ let
let php7 = lib.versionAtLeast version "7.0";
mysqlHeaders = mysql.lib.dev or mysql;
mysqlndSupport = config.php.mysqlnd or false;
mysqlBuildInputs = if mysqlndSupport then [] else [ mysqlHeaders ];
in composableDerivation.composableDerivation {} (fixed: {
@ -110,13 +112,13 @@ let
};
mysql = {
configureFlags = ["--with-mysql"];
buildInputs = [ mysqlHeaders ];
configureFlags = ["--with-mysql${if mysqlndSupport then "=mysqlnd" else ""}"];
buildInputs = mysqlBuildInputs;
};
mysqli = {
configureFlags = ["--with-mysqli=${mysqlHeaders}/bin/mysql_config"];
buildInputs = [ mysqlHeaders ];
configureFlags = ["--with-mysqli=${if mysqlndSupport then "mysqlnd" else "${mysqlHeaders}/bin/mysql_config"}"];
buildInputs = mysqlBuildInputs;
};
mysqli_embedded = {
@ -126,8 +128,8 @@ let
};
pdo_mysql = {
configureFlags = ["--with-pdo-mysql=${mysqlHeaders}"];
buildInputs = [ mysqlHeaders ];
configureFlags = ["--with-pdo-mysql=${if mysqlndSupport then "mysqlnd" else mysqlHeaders}"];
buildInputs = mysqlBuildInputs;
};
bcmath = {