Skip to content

Commit c43c71f

Browse files
drupoljtojnar
authored andcommitted
Fix tokenizer extension compilation.
1 parent ed447ee commit c43c71f

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
@@ -322,7 +322,9 @@ in
322322
ourPatches ++ upstreamPatches;
323323

324324
nativeBuildInputs = attrs.nativeBuildInputs ++ [
325+
# Tarballs ship pre-generated parser files.
325326
pkgs.bison
327+
pkgs.flex
326328
];
327329

328330
postPatch = ''
@@ -428,11 +430,20 @@ in
428430

429431
tokenizer =
430432
prev.extensions.tokenizer.overrideAttrs (attrs: {
431-
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ lib.optionals isBuiltFromGit [
433+
nativeBuildInputs = attrs.nativeBuildInputs ++ [
432434
# Tarballs ship pre-generated parser files.
433435
pkgs.bison
434436
pkgs.flex
435437
];
438+
postPatch = ''
439+
echo '
440+
# TODO: Add explanation here.
441+
# See https://github.com/fossar/nix-phps/pull/104#issuecomment-1113964195
442+
PHP_PROG_BISON([3.0.0])
443+
PHP_PROG_RE2C([0.13.4])
444+
' | cat - ext/tokenizer/config.m4 > ext/tokenizer/config.m4.tmp
445+
mv ext/tokenizer/config.m4{.tmp,}
446+
'';
436447
});
437448

438449
wddx =

0 commit comments

Comments
 (0)