Skip to content

Commit

Permalink
Merge pull request #62783 from Izorkin/php-packages
Browse files Browse the repository at this point in the history
php: update build config and php package
  • Loading branch information
etu committed Jun 12, 2019
2 parents 734b3e7 + d613239 commit 039983b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions pkgs/build-support/build-pecl.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, php, autoreconfHook, fetchurl }:
{ stdenv, php, autoreconfHook, fetchurl, re2c }:

{ pname
, version
Expand All @@ -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;
Expand Down
20 changes: 8 additions & 12 deletions pkgs/development/interpreters/php/default.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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" ];

Expand Down
19 changes: 12 additions & 7 deletions pkgs/top-level/php-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = ":";
Expand Down Expand Up @@ -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 ];

Expand Down Expand Up @@ -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" ];
};

Expand Down

0 comments on commit 039983b

Please sign in to comment.