Merge pull request #62783 from Izorkin/php-packages

php: update build config and php package
This commit is contained in:
Elis Hirwing 2019-06-12 13:14:22 +02:00 committed by GitHub
commit 039983bd7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 21 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, php, autoreconfHook, fetchurl }:
{ stdenv, php, autoreconfHook, fetchurl, re2c }:
{ pname
, version
@ -17,7 +17,7 @@ stdenv.mkDerivation (args // {
inherit src;
nativeBuildInputs = [ autoreconfHook ] ++ nativeBuildInputs;
nativeBuildInputs = [ autoreconfHook re2c ] ++ nativeBuildInputs;
buildInputs = [ php ] ++ buildInputs;
makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags;

View File

@ -1,10 +1,10 @@
# pcre functionality is tested in nixos/tests/php-pcre.nix
{ lib, stdenv, fetchurl, flex, bison, autoconf
{ lib, stdenv, fetchurl, autoconf, bison, libtool, pkgconfig, re2c
, mysql, libxml2, readline, zlib, curl, postgresql, gettext
, openssl, pcre, pcre2, pkgconfig, sqlite, config, libjpeg, libpng, freetype
, openssl, pcre, pcre2, sqlite, config, libjpeg, libpng, freetype
, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, unixODBC
, uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy, libargon2
, libzip, re2c, valgrind
, libzip, valgrind
}:
with lib;
@ -48,7 +48,7 @@ let
, ftpSupport ? config.php.ftp or true
, fpmSupport ? config.php.fpm or true
, gmpSupport ? config.php.gmp or true
, ztsSupport ? config.php.zts or false
, ztsSupport ? (config.php.zts or false) || (apxs2Support)
, calendarSupport ? config.php.calendar or true
, sodiumSupport ? (config.php.sodium or true) && (versionAtLeast version "7.2")
, tidySupport ? (config.php.tidy or false)
@ -59,10 +59,8 @@ let
, cliSupport ? config.php.cli or true
, pharSupport ? config.php.phar or true
, xmlrpcSupport ? (config.php.xmlrpc or false) && (libxml2Support)
, re2cSupport ? config.php.re2c or true
, cgotoSupport ? (config.php.cgoto or false) && (re2cSupport)
, cgotoSupport ? config.php.cgoto or false
, valgrindSupport ? (config.php.valgrind or true) && (versionAtLeast version "7.2")
, valgrindPcreSupport ? (config.php.valgrindPcreSupport or false) && (valgrindSupport) && (versionAtLeast version "7.2")
}:
let
@ -76,8 +74,8 @@ let
enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig autoconf ];
buildInputs = [ flex bison ]
nativeBuildInputs = [ autoconf bison libtool pkgconfig re2c ];
buildInputs = [ ]
++ optional (versionOlder version "7.3") pcre
++ optional (versionAtLeast version "7.3") pcre2
++ optional withSystemd systemd
@ -108,7 +106,6 @@ let
++ optional tidySupport html-tidy
++ optional argon2Support libargon2
++ optional libzipSupport libzip
++ optional re2cSupport re2c
++ optional valgrindSupport valgrind;
CXXFLAGS = optional stdenv.cc.isClang "-std=c++11";
@ -192,8 +189,7 @@ let
++ optional (!pharSupport) "--disable-phar"
++ optional xmlrpcSupport "--with-xmlrpc"
++ optional cgotoSupport "--enable-re2c-cgoto"
++ optional valgrindSupport "--with-valgrind=${valgrind.dev}"
++ optional valgrindPcreSupport "--with-pcre-valgrind";
++ optional valgrindSupport "--with-valgrind=${valgrind.dev}";
hardeningDisable = [ "bindnow" ];

View File

@ -4,7 +4,7 @@ let
self = with self; {
buildPecl = import ../build-support/build-pecl.nix {
inherit php;
inherit (pkgs) stdenv autoreconfHook fetchurl;
inherit (pkgs) stdenv autoreconfHook fetchurl re2c;
};
# Wrap mkDerivation to prepend pname with "php-" to make names consistent
@ -73,12 +73,12 @@ let
};
composer = mkDerivation rec {
version = "1.8.5";
version = "1.8.6";
pname = "composer";
src = pkgs.fetchurl {
url = "https://getcomposer.org/download/${version}/composer.phar";
sha256 = "05qfgh2dz8pjf47ndyhkicqbnqzwypk90cczd4c6d8jl9gbiqk2f";
sha256 = "0hnm7njab9nsifpb1qbwx54yfpsi00g8mzny11s13ibjvd9rnvxn";
};
unpackPhase = ":";
@ -143,12 +143,17 @@ let
};
event = buildPecl rec {
version = "2.5.1";
version = "2.5.2";
pname = "event";
sha256 = "0hnvmlbl994fjliqc3c65gv6f6syh9zmlfcbizqs3k67bbmkhiad";
sha256 = "0b9zbwyyfcrzs1gcpqn2dkjq6jliw89g2m981f8ildbp84snkpcf";
configureFlags = [ "--with-event-libevent-dir=${pkgs.libevent.dev}" ];
configureFlags = [
"--with-event-libevent-dir=${pkgs.libevent.dev}"
"--with-event-core"
"--with-event-extra"
"--with-event-pthreads"
];
nativeBuildInputs = [ pkgs.pkgconfig ];
buildInputs = with pkgs; [ openssl libevent ];
@ -216,7 +221,7 @@ let
sha256 = "0jhivxj1nkkza4h23z33y7xhffii60d7dr51h1czjk10qywl7pyd";
buildInputs = [ pkgs.re2c pkgs.oracle-instantclient ];
buildInputs = [ pkgs.oracle-instantclient ];
configureFlags = [ "--with-oci8=shared,instantclient,${pkgs.oracle-instantclient}/lib" ];
};