php: Add zip and optional bz2 support

Use the overload bz2 = true to enable bz2 support for php.
zip support is enabled by default as it doesn't require any library.
This commit is contained in:
bbenoist 2013-02-12 21:23:24 +01:00
parent 8fd5fcbda5
commit 99934eb363

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, composableDerivation, autoconf, automake, flex, bison
, apacheHttpd, mysql, libxml2, readline, zlib, curl, gd, postgresql, gettext
, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng, freetype
, libxslt, libmcrypt }:
, libxslt, libmcrypt, bzip2 }:
let
libmcryptOverride = libmcrypt.override { disablePosixThreads = true; };
@ -125,6 +125,15 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
buildInputs = [libmcryptOverride];
};
bz2 = {
configureFlags = ["--with-bz2=${bzip2}"];
buildInputs = [bzip2];
};
zip = {
configureFlags = ["--enable-zip"];
};
/*
php is build within this derivation in order to add the xdebug lines to the php.ini.
So both Apache and command line php both use xdebug without having to configure anything.
@ -158,6 +167,8 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
gdSupport = config.php.gd or true;
xslSupport = config.php.xsl or false;
mcryptSupport = config.php.mcrypt or false;
bz2Support = config.php.bz2 or false;
zipSupport = config.php.zip or true;
};
configurePhase = ''