Skip to content

Commit 8db4163

Browse files
committed
fix pdo and tokenizer extensions compilation
Is it something we have to report upstream ?
1 parent d8ea63d commit 8db4163

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

pkgs/package-overrides.nix

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,14 @@ in
571571
];
572572
in
573573
ourPatches ++ upstreamPatches;
574+
575+
buildInputs = attrs.buildInputs or [] ++ [
576+
pkgs.bison
577+
];
578+
579+
preConfigure = attrs.preConfigure or "" + lib.optionalString (lib.versionAtLeast prev.php.version "7.4") ''
580+
../../scripts/dev/genfiles
581+
'';
574582
});
575583

576584
pdo_mysql =
@@ -697,15 +705,6 @@ in
697705
ourPatches ++ upstreamPatches;
698706
});
699707

700-
tokenizer = prev.extensions.tokenizer.overrideAttrs (attrs: {
701-
patches = builtins.filter
702-
(patch:
703-
# The patch do not apply to PHP < 8.1
704-
patchName patch == "fix-tokenizer-php81.patch" -> lib.versionAtLeast prev.php.version "8.1"
705-
)
706-
(attrs.patches or []);
707-
});
708-
709708
tokenizer = prev.extensions.tokenizer.overrideAttrs (attrs: {
710709
patches = builtins.filter
711710
(patch:
@@ -714,12 +713,13 @@ in
714713
)
715714
(attrs.patches or []);
716715

717-
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ lib.optionals isBuiltFromGit [
718-
# Tarballs ship pre-generated parser files.
716+
buildInputs = attrs.buildInputs or [] ++ [
719717
pkgs.bison
720-
pkgs.flex
721718
];
722719

720+
preConfigure = attrs.preConfigure or "" + lib.optionalString (lib.versionAtLeast prev.php.version "7.4") ''
721+
../../scripts/dev/genfiles
722+
'';
723723
});
724724

725725
wddx =

0 commit comments

Comments
 (0)