From dd57b3f25042f3fe7852d0e6a817da440aebfe98 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 8 Sep 2023 11:47:30 +0200 Subject: [PATCH 1/2] php: fix path to `genfiles` --- pkgs/development/interpreters/php/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix index d60d0cdf1fd1..cee1e833f9a6 100644 --- a/pkgs/development/interpreters/php/generic.nix +++ b/pkgs/development/interpreters/php/generic.nix @@ -271,8 +271,8 @@ let ./buildconf --copy --force - if test -f $src/genfiles; then - ./genfiles + if [ -f "scripts/dev/genfiles" ]; then + ./scripts/dev/genfiles fi '' + lib.optionalString stdenv.isDarwin '' substituteInPlace configure --replace "-lstdc++" "-lc++" From 95fd689f85add9a871fedcb896104330236b338f Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 8 Sep 2023 12:37:24 +0200 Subject: [PATCH 2/2] php: run `genfiles` for building extensions too --- pkgs/top-level/php-packages.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index f60ae14cf585..2e810ca09927 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -31,6 +31,7 @@ , pam , pcre2 , postgresql +, bison , re2c , readline , rsync @@ -101,14 +102,22 @@ lib.makeScope pkgs.newScope (self: with self; { autoconf pkg-config re2c + bison ]; inherit configureFlags internalDeps buildInputs zendExtension doCheck; preConfigurePhases = [ + "genfiles" "cdToExtensionRootPhase" ]; + genfiles = '' + if [ -f "scripts/dev/genfiles" ]; then + ./scripts/dev/genfiles + fi + ''; + cdToExtensionRootPhase = '' # Go to extension source root. cd "ext/${extName}"