Merge pull request #254001 from NixOS/php/update-configure-phase

php: fix `genfiles` calls
This commit is contained in:
Pol Dellaiera 2023-09-08 15:41:55 +02:00 committed by GitHub
commit 701ab935f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -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++"

View file

@ -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}"