Skip to content

Commit 27567be

Browse files
committed
Fix tokenizer extension compilation.
1 parent efa3dfb commit 27567be

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pkgs/package-overrides.nix

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,9 @@ in
359359
ourPatches ++ upstreamPatches;
360360

361361
nativeBuildInputs = attrs.nativeBuildInputs ++ [
362+
# Tarballs ship pre-generated parser files.
362363
pkgs.bison
364+
pkgs.flex
363365
];
364366

365367
postPatch = ''
@@ -470,11 +472,20 @@ in
470472

471473
tokenizer =
472474
prev.extensions.tokenizer.overrideAttrs (attrs: {
473-
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ lib.optionals isBuiltFromGit [
475+
nativeBuildInputs = attrs.nativeBuildInputs ++ [
474476
# Tarballs ship pre-generated parser files.
475477
pkgs.bison
476478
pkgs.flex
477479
];
480+
postPatch = ''
481+
echo '
482+
# TODO: Add explanation here.
483+
# See https://github.com/fossar/nix-phps/pull/104#issuecomment-1113964195
484+
PHP_PROG_BISON([3.0.0])
485+
PHP_PROG_RE2C([0.13.4])
486+
' | cat - ext/tokenizer/config.m4 > ext/tokenizer/config.m4.tmp
487+
mv ext/tokenizer/config.m4{.tmp,}
488+
'';
478489
});
479490

480491
wddx =

0 commit comments

Comments
 (0)