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 May 29, 2022
1 parent 6bc15db commit 7cb1948
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 @@ -322,7 +322,9 @@ in
ourPatches ++ upstreamPatches;

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

postPatch = ''
Expand Down Expand Up @@ -428,11 +430,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 7cb1948

Please sign in to comment.