phpPackages: build phpPackages with re2c

This commit is contained in:
Izorkin 2019-06-06 22:16:58 +03:00
parent f93d637ef9
commit 925f803e28
3 changed files with 6 additions and 8 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

@ -59,8 +59,7 @@ 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")
}:
@ -76,7 +75,7 @@ let
enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig autoconf ];
nativeBuildInputs = [ pkgconfig autoconf re2c ];
buildInputs = [ flex bison ]
++ optional (versionOlder version "7.3") pcre
++ optional (versionAtLeast version "7.3") pcre2
@ -108,7 +107,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";

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
@ -216,7 +216,7 @@ let
sha256 = "0jhivxj1nkkza4h23z33y7xhffii60d7dr51h1czjk10qywl7pyd";
buildInputs = [ pkgs.re2c pkgs.oracle-instantclient ];
buildInputs = [ pkgs.oracle-instantclient ];
configureFlags = [ "--with-oci8=shared,instantclient,${pkgs.oracle-instantclient}/lib" ];
};