From 925f803e28b3b45692587bfedcf38491ad525534 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 6 Jun 2019 22:16:58 +0300 Subject: [PATCH] phpPackages: build phpPackages with re2c --- pkgs/build-support/build-pecl.nix | 4 ++-- pkgs/development/interpreters/php/default.nix | 6 ++---- pkgs/top-level/php-packages.nix | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/build-support/build-pecl.nix b/pkgs/build-support/build-pecl.nix index d08f8822d751..a1030e3b34fa 100644 --- a/pkgs/build-support/build-pecl.nix +++ b/pkgs/build-support/build-pecl.nix @@ -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; diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index ee980e1cdbc5..718a7963b2e4 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -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"; diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 119b99c3a56e..72712001ba85 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -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" ]; };