fix to build against tree-sitter 0.15

This commit is contained in:
2025-03-16 00:29:35 +00:00
parent c2fcc8b6ee
commit 9ccb867150
4 changed files with 65 additions and 39 deletions

View File

@@ -2,14 +2,28 @@
pkgs.tree-sitter.buildGrammar {
src = ./.;
version = "0.1.0";
version = "0.2.0";
language = "nix-shell";
generate = true;
location = "tree-sitter-nix-shell";
checkPhase = ''
(cd ..; make test)
'';
nativeCheckInputs = with pkgs; [ htmlq ];
checkPhase = ''
runHook preCheck
(cd ..; make test)
runHook postCheck
'';
doCheck = true;
nativeInstallCheckInputs = with pkgs; [ tree ];
installCheckPhase = ''
runHook preInstallCheck
# make sure that all files i expect to be installed are actually installed
(test -x $out/parser && test -f $out/queries/highlights.scm && test -f $out/queries/injections.scm) || \
(tree $out; echo "expected output to contain /parser and /queries/"; false)
runHook postInstallCheck
'';
doInstallCheck = true;
}