summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-10-01 21:16:55 +0200
committerRobin Gloster <mail@glob.in>2017-01-19 22:47:10 +0100
commita7f25fe16793ba50cb015034513ee6b40e0eb016 (patch)
tree0b6ef3b9e38365c8951f5424c125ede153271242 /pkgs/development/interpreters
parent10cfe945fed31fef4ee97bddc2df5192eb69da32 (diff)
downloadnixlib-a7f25fe16793ba50cb015034513ee6b40e0eb016.tar
nixlib-a7f25fe16793ba50cb015034513ee6b40e0eb016.tar.gz
nixlib-a7f25fe16793ba50cb015034513ee6b40e0eb016.tar.bz2
nixlib-a7f25fe16793ba50cb015034513ee6b40e0eb016.tar.lz
nixlib-a7f25fe16793ba50cb015034513ee6b40e0eb016.tar.xz
nixlib-a7f25fe16793ba50cb015034513ee6b40e0eb016.tar.zst
nixlib-a7f25fe16793ba50cb015034513ee6b40e0eb016.zip
php: add embedded package
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/php/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index 1a5bed6d20b9..920bf2c3207a 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -38,6 +38,10 @@ let
           buildInputs = [apacheHttpd];
         };
 
+        embed = {
+          configureFlags = ["--enable-embed"];
+        };
+
         # Extensions
         imap = {
           configureFlags = [
@@ -230,6 +234,7 @@ let
         pdo_mysqlSupport = config.php.pdo_mysql or true;
         libxml2Support = config.php.libxml2 or true;
         apxs2Support = config.php.apxs2 or (!stdenv.isDarwin);
+        embedSupport = config.php.embed or false;
         bcmathSupport = config.php.bcmath or true;
         socketsSupport = config.php.sockets or true;
         curlSupport = config.php.curl or true;
@@ -263,13 +268,15 @@ let
 
       configurePhase = ''
         # Don't record the configure flags since this causes unnecessary
-        # runtime dependencies.
+        # runtime dependencies - except for php-embed, as uwsgi needs them.
+        ${lib.optionalString (!(config.php.embed or false)) ''
         for i in main/build-defs.h.in scripts/php-config.in; do
           substituteInPlace $i \
             --replace '@CONFIGURE_COMMAND@' '(omitted)' \
             --replace '@CONFIGURE_OPTIONS@' "" \
             --replace '@PHP_LDFLAGS@' ""
         done
+        ''}
 
         [[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin
         ./configure --with-config-file-scan-dir=/etc/php.d --with-config-file-path=$out/etc --prefix=$out $configureFlags