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.
Nix promises to run us in an (empty) temporary directory. So we should
not need mktemp, we can just use deterministic names.
Our temporary directory should already not be leaking into the
output (and we enforce that for the profile), so this should just be
cleanup that makes debugging slightly easier.
We were installing bootstrap.el, install.el and indent.el. The former
two would have undesirable side effects if loaded, the latter shadows a
built-in library.
Exposes what I think is a pre-existing problem with too many directories
getting added to load-path, because we now install a directory
containing a file named "default" that was previously omitted.