tree-sitter.grammars: compile scanner.cc if exists
otherwise neovim's treesitter fails with for instance: `undefined symbol: tree_sitter_bash_external_scanner_create`
This commit is contained in:
parent
51b854a254
commit
be4832848d
@ -18,7 +18,11 @@ stdenv.mkDerivation {
|
|||||||
configurePhase= ":";
|
configurePhase= ":";
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
$CC -I$src/src/ -shared -o parser -Os $src/src/parser.c
|
scanner_cc="$src/src/scanner.cc"
|
||||||
|
if [ ! -f "$scanner_cc" ]; then
|
||||||
|
scanner_cc=""
|
||||||
|
fi
|
||||||
|
$CC -I$src/src/ -shared -o parser -Os $src/src/parser.c $scanner_cc -lstdc++
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user