Skip to content

Commit 6d8aca1

Browse files
drupoljtojnar
authored andcommitted
php-master: Fix a build issue on PHP < 7.4.0RC1
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.
1 parent 1e5acf6 commit 6d8aca1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkgs/phps.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ let
1515
composeOverrides = a: b: prev.lib.composeExtensions (_: a) (_: b) { };
1616

1717
_mkArgs =
18-
args:
18+
{
19+
# Keep default flags in sync with generic.nix
20+
pearSupport ? true,
21+
...
22+
}@args:
1923

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

6371
preConfigure =

0 commit comments

Comments
 (0)