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)

+20
+16
pkgs/development/tools/parsing/tree-sitter/update.nix
··· 494 494 }; 495 495 }; 496 496 497 + pinnedGrammars = [ 498 + "tree-sitter-bash" 499 + "tree-sitter-bibtex" 500 + "tree-sitter-c" 501 + "tree-sitter-comment" 502 + "tree-sitter-fortran" 503 + "tree-sitter-hcl" 504 + "tree-sitter-hyprlang" 505 + "tree-sitter-llvm" 506 + "tree-sitter-markdown" 507 + "tree-sitter-query" 508 + "tree-sitter-rust" 509 + ]; 510 + pinnedGrammarsJson = jsonFile pinnedGrammars; 511 + 497 512 allGrammars = 498 513 let 499 514 treeSitterOrgaGrammars = lib.listToAttrs ( ··· 523 538 inherit 524 539 knownTreeSitterOrgGrammarRepos 525 540 ignoredTreeSitterOrgRepos 541 + pinnedGrammars 526 542 ; 527 543 } 528 544 (
+4
pkgs/development/tools/parsing/tree-sitter/update_impl.py
··· 96 96 "outputDir": outputDir, 97 97 "nixRepoAttrName": nixRepoAttrName, 98 98 }: 99 + if repo in args["pinnedGrammars"]: 100 + log(f"Grammar {repo} is pinned, skipping upgrade...") 101 + return 102 + 99 103 token: str | None = os.environ.get("GITHUB_TOKEN", None) 100 104 out = run_cmd( 101 105 curl_github_args(