Skip to content

Commit d4ed6e8

Browse files
committed
Fix tokenizer extension compilation.
1 parent 7461915 commit d4ed6e8

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
@@ -246,8 +246,10 @@ in
246246
in
247247
ourPatches ++ upstreamPatches;
248248

249-
nativeBuildInputs = attrs.nativeBuildInputs ++ [
249+
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ lib.optionals isBuiltFromGit [
250+
# Tarballs ship pre-generated parser files.
250251
pkgs.bison
252+
pkgs.flex
251253
];
252254

253255
postPatch = ''
@@ -340,6 +342,15 @@ in
340342
pkgs.bison
341343
pkgs.flex
342344
];
345+
postPatch = ''
346+
echo '
347+
# TODO: Add explanation here.
348+
# See https://github.com/fossar/nix-phps/pull/104#issuecomment-1113964195
349+
PHP_PROG_BISON([3.0.0])
350+
PHP_PROG_RE2C([0.13.4])
351+
' | cat - ext/tokenizer/config.m4 > ext/tokenizer/config.m4.tmp
352+
mv ext/tokenizer/config.m4{.tmp,}
353+
'';
343354
});
344355

345356
xdebug =

0 commit comments

Comments
 (0)