Skip to content

Commit

Permalink
Fix tokenizer extension compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jun 25, 2022
1 parent efa3dfb commit 27567be
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 @@ -359,7 +359,9 @@ in
ourPatches ++ upstreamPatches;

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

postPatch = ''
Expand Down Expand Up @@ -470,11 +472,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,}
'';
});

wddx =
Expand Down

0 comments on commit 27567be

Please sign in to comment.