Skip to content

Commit

Permalink
php-master: Fix a build issue on PHP < 7.4.0RC1
Browse files Browse the repository at this point in the history
The `--enable-xml` flag was renamed in 7.4.0RC1 to `--with-xml`:

php/php-src@9f0c9b7

But `generic.nix` applies the old flag for `lib.versionOlder php.version "7.4"`
so we need to re-add it manually to also cover 7.4 development versions.
drupol authored and jtojnar committed May 1, 2022
1 parent 1e5acf6 commit 6d8aca1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/phps.nix
Original file line number Diff line number Diff line change
@@ -15,7 +15,11 @@ let
composeOverrides = a: b: prev.lib.composeExtensions (_: a) (_: b) { };

_mkArgs =
args:
{
# Keep default flags in sync with generic.nix
pearSupport ? true,
...
}@args:

args // {
inherit packageOverrides;
@@ -58,6 +62,10 @@ let
++ prev.lib.optionals (prev.lib.versionOlder args.version "7.4") [
# phar extension’s build system expects hash or it will degrade.
"--enable-hash"
] ++ prev.lib.optionals (pearSupport && (prev.lib.versionOlder args.version "7.4" || prev.lib.hasPrefix "7.4.0.pre" args.version)) [
# The flag was renamed in 7.4.0RC1 but `generic.nix` applies it for PHP < 7.4.
# https://github.com/php/php-src/commit/9f0c9b7ad6316b6185a2fc2997bf241785c30120
"--enable-libxml"
];

preConfigure =

0 comments on commit 6d8aca1

Please sign in to comment.