Skip to content

Commit

Permalink
php: add config.php.mysqlnd option
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Nov 6, 2017
1 parent 240b4f3 commit 41cd4f2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkgs/development/interpreters/php/default.nix
Expand Up @@ -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: {

Expand Down Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand Down

0 comments on commit 41cd4f2

Please sign in to comment.