Partially fix tree-sitter-langs

tree-sitter-langs has special handling in nixpkgs, and our pinning
breaks assumptions it makes about version numbers. This causes
tree-sitter-langs to attempt to download and write a grammar bundle both
at build time (where the network request fails) and runtime (where it
causes an error on visiting a file supposed to be handled by
tree-sitter).

Fix up our derivation so it loads the Nix-provided grammar bundle.

This only partially fixes the problem: at least for Go, the
tree-sitter-langs package now loads, but visiting a Go file causes
`tsc-lang-abi-too-new 14 (13 . 13)`.

The included test fails without the fix in this commit, but does not
trigger this new failure.

Commit this partial fix because after
nixos/nixpkgs@2421239d66 the build-time
failure became an error. This should fix CI and leave us no worse off
than before.
This commit is contained in:
Marien Zwart 2024-05-25 23:38:29 +10:00
parent 1f8c157d1e
commit c8011f8f10
No known key found for this signature in database
3 changed files with 48 additions and 0 deletions

View file

@ -88,6 +88,11 @@ in {
org-re-reveal = doomTest "org-re-reveal" { lang.org = [ "+present" ]; } { };
tree-sitter = doomTest "tree-sitter" {
tools.tree-sitter = true;
lang.go = [ "+tree-sitter" ];
} { };
# Various tests of module combinations.
unpinned-org = doomTest "external-org" { app.rss = [ "+org" ]; } { };
# Dependencies that require a module flag enabled and a different module or flag disabled.