tree-sitter.grammars: pin known bad with pythonPackages.tree-sitter 0.24

This commit prevents the update script from touching the files listed
under `pinnedGrammars`. This way breakages cannot accidentally be caused
again (re: #414233 breaking the heck out of staging-next et al)

Changed files
+20
pkgs
development
tools
parsing
+16
pkgs/development/tools/parsing/tree-sitter/update.nix
···
};
};
+
pinnedGrammars = [
+
"tree-sitter-bash"
+
"tree-sitter-bibtex"
+
"tree-sitter-c"
+
"tree-sitter-comment"
+
"tree-sitter-fortran"
+
"tree-sitter-hcl"
+
"tree-sitter-hyprlang"
+
"tree-sitter-llvm"
+
"tree-sitter-markdown"
+
"tree-sitter-query"
+
"tree-sitter-rust"
+
];
+
pinnedGrammarsJson = jsonFile pinnedGrammars;
+
allGrammars =
let
treeSitterOrgaGrammars = lib.listToAttrs (
···
inherit
knownTreeSitterOrgGrammarRepos
ignoredTreeSitterOrgRepos
+
pinnedGrammars
;
}
(
+4
pkgs/development/tools/parsing/tree-sitter/update_impl.py
···
"outputDir": outputDir,
"nixRepoAttrName": nixRepoAttrName,
}:
+
if repo in args["pinnedGrammars"]:
+
log(f"Grammar {repo} is pinned, skipping upgrade...")
+
return
+
token: str | None = os.environ.get("GITHUB_TOKEN", None)
out = run_cmd(
curl_github_args(