From a7f25fe16793ba50cb015034513ee6b40e0eb016 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 1 Oct 2016 21:16:55 +0200 Subject: [PATCH] php: add embedded package --- pkgs/development/interpreters/php/default.nix | 9 ++++++++- pkgs/top-level/all-packages.nix | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 1a5bed6d20b..920bf2c3207 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23a3eae8385..a30602fdad4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5756,6 +5756,14 @@ in php70 php71; + php-embed = php71-embed; + + php71-embed = php71.override { + config.php.embed = true; + config.php.apxs2 = false; + }; + + picoc = callPackage ../development/interpreters/picoc {}; picolisp = callPackage ../development/interpreters/picolisp {};