Skip to content

Commit

Permalink
Fix tokenizer extension compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol authored and jtojnar committed May 15, 2022
1 parent 9b905cb commit ffaeb48
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkgs/package-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ in
ourPatches ++ upstreamPatches;

nativeBuildInputs = attrs.nativeBuildInputs ++ [
# Tarballs ship pre-generated parser files.
pkgs.bison
pkgs.flex
];

postPatch = ''
Expand Down Expand Up @@ -335,11 +337,20 @@ in

tokenizer =
prev.extensions.tokenizer.overrideAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ lib.optionals isBuiltFromGit [
nativeBuildInputs = attrs.nativeBuildInputs ++ [
# Tarballs ship pre-generated parser files.
pkgs.bison
pkgs.flex
];
postPatch = ''
echo '
# TODO: Add explanation here.
# See https://github.com/fossar/nix-phps/pull/104#issuecomment-1113964195
PHP_PROG_BISON([3.0.0])
PHP_PROG_RE2C([0.13.4])
' | cat - ext/tokenizer/config.m4 > ext/tokenizer/config.m4.tmp
mv ext/tokenizer/config.m4{.tmp,}
'';
});

xdebug =
Expand Down

0 comments on commit ffaeb48

Please sign in to comment.