mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
commit
f33ebf88b9
|
@ -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, bzip2, icu }:
|
||||
, openssl, pkgconfig, sqlite, config, libjpeg, libpng, freetype, libxslt
|
||||
, libmcrypt, bzip2, icu, libssh2, makeWrapper, libiconvOrEmpty, libiconv }:
|
||||
|
||||
let
|
||||
libmcryptOverride = libmcrypt.override { disablePosixThreads = true; };
|
||||
|
@ -15,7 +15,15 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = ["flex" "bison" "pkgconfig"];
|
||||
buildInputs
|
||||
= [ flex bison pkgconfig ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ libssh2 makeWrapper ];
|
||||
|
||||
# need to include the C++ standard library when compiling on darwin
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lstdc++";
|
||||
|
||||
# need to specify where the dylib for icu is stored
|
||||
DYLD_LIBRARY_PATH = stdenv.lib.optionalString stdenv.isDarwin "${icu}/lib";
|
||||
|
||||
flags = {
|
||||
|
||||
|
@ -35,17 +43,21 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
|
|||
buildInputs = [curl openssl];
|
||||
};
|
||||
|
||||
pcntl = {
|
||||
configureFlags = [ "--enable-pcntl" ];
|
||||
};
|
||||
|
||||
zlib = {
|
||||
configureFlags = ["--with-zlib=${zlib}"];
|
||||
buildInputs = [zlib];
|
||||
};
|
||||
|
||||
libxml2 = {
|
||||
configureFlags = [
|
||||
"--with-libxml-dir=${libxml2}"
|
||||
#"--with-iconv-dir=${libiconv}"
|
||||
];
|
||||
buildInputs = [ libxml2 ];
|
||||
configureFlags
|
||||
= [ "--with-libxml-dir=${libxml2}" ]
|
||||
++ stdenv.lib.optional (libiconvOrEmpty != [])
|
||||
[ "--with-iconv=${libiconv}" ];
|
||||
buildInputs = [ libxml2 ] ++ libiconvOrEmpty;
|
||||
};
|
||||
|
||||
readline = {
|
||||
|
@ -166,30 +178,31 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
|
|||
};
|
||||
|
||||
cfg = {
|
||||
mysqlSupport = config.php.mysql or true;
|
||||
mysqliSupport = config.php.mysqli or true;
|
||||
pdo_mysqlSupport = config.php.pdo_mysql or true;
|
||||
libxml2Support = config.php.libxml2 or true;
|
||||
apxs2Support = config.php.apxs2 or true;
|
||||
bcmathSupport = config.php.bcmath or true;
|
||||
socketsSupport = config.php.sockets or true;
|
||||
bz2Support = config.php.bz2 or false;
|
||||
curlSupport = config.php.curl or true;
|
||||
exifSupport = config.php.exif or true;
|
||||
ftpSupport = config.php.ftp or true;
|
||||
gdSupport = config.php.gd or true;
|
||||
gettextSupport = config.php.gettext or true;
|
||||
intlSupport = config.php.intl or true;
|
||||
libxml2Support = config.php.libxml2 or true;
|
||||
mbstringSupport = config.php.mbstring or true;
|
||||
mcryptSupport = config.php.mcrypt or false;
|
||||
mysqlSupport = config.php.mysql or true;
|
||||
mysqliSupport = config.php.mysqli or true;
|
||||
opensslSupport = config.php.openssl or true;
|
||||
pcntlSupport = config.php.pcntl or true;
|
||||
pdo_mysqlSupport = config.php.pdo_mysql or true;
|
||||
postgresqlSupport = config.php.postgresql or true;
|
||||
readlineSupport = config.php.readline or true;
|
||||
sqliteSupport = config.php.sqlite or true;
|
||||
soapSupport = config.php.soap or true;
|
||||
zlibSupport = config.php.zlib or true;
|
||||
opensslSupport = config.php.openssl or true;
|
||||
mbstringSupport = config.php.mbstring or true;
|
||||
gdSupport = config.php.gd or true;
|
||||
intlSupport = config.php.intl or true;
|
||||
exifSupport = config.php.exif or true;
|
||||
socketsSupport = config.php.sockets or true;
|
||||
sqliteSupport = config.php.sqlite 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;
|
||||
ftpSupport = config.php.ftp or true;
|
||||
zlibSupport = config.php.zlib or true;
|
||||
};
|
||||
|
||||
configurePhase = ''
|
||||
|
@ -202,7 +215,11 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
|
|||
installPhase = ''
|
||||
unset installPhase; installPhase;
|
||||
cp php.ini-production $iniFile
|
||||
'';
|
||||
'' + ( stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
for prog in $out/bin/*; do
|
||||
wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "$DYLD_LIBRARY_PATH"
|
||||
done
|
||||
'' );
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://nl.php.net/get/php-${version}.tar.bz2/from/this/mirror";
|
||||
|
@ -212,8 +229,10 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
|
|||
|
||||
meta = {
|
||||
description = "The PHP language runtime engine";
|
||||
homepage = http://www.php.net/;
|
||||
license = "PHP-3";
|
||||
homepage = http://www.php.net/;
|
||||
license = "PHP-3";
|
||||
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
|
||||
patches = [./fix.patch];
|
||||
|
|
Loading…
Reference in a new issue