diff --git a/pkgs/by-name/ai/aider-chat/fix-tree-sitter.patch b/pkgs/by-name/ai/aider-chat/fix-tree-sitter.patch deleted file mode 100644 index df06e60362943..0000000000000 --- a/pkgs/by-name/ai/aider-chat/fix-tree-sitter.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/aider/repomap.py b/aider/repomap.py -index 23eee239..0a40f2e6 100644 ---- a/aider/repomap.py -+++ b/aider/repomap.py -@@ -16,6 +16,7 @@ from grep_ast import TreeContext, filename_to_lang - from pygments.lexers import guess_lexer_for_filename - from pygments.token import Token - from tqdm import tqdm -+from tree_sitter import QueryCursor - - from aider.dump import dump - from aider.special import filter_important_files -@@ -286,7 +287,7 @@ class RepoMap: - - # Run the tags queries - query = language.query(query_scm) -- captures = query.captures(tree.root_node) -+ captures = QueryCursor(query).captures(tree.root_node) - - saw = set() - if USING_TSL_PACK: diff --git a/pkgs/by-name/ai/aider-chat/package.nix b/pkgs/by-name/ai/aider-chat/package.nix index 08ea22cd69677..588216b36ad7e 100644 --- a/pkgs/by-name/ai/aider-chat/package.nix +++ b/pkgs/by-name/ai/aider-chat/package.nix @@ -146,8 +146,6 @@ let ]; patches = [ - ./fix-tree-sitter.patch - (replaceVars ./fix-flake8-invoke.patch { flake8 = lib.getExe python3Packages.flake8; }) diff --git a/pkgs/development/python-modules/textual/default.nix b/pkgs/development/python-modules/textual/default.nix index dab624cd40535..45dcec6ce6a5f 100644 --- a/pkgs/development/python-modules/textual/default.nix +++ b/pkgs/development/python-modules/textual/default.nix @@ -95,7 +95,5 @@ buildPythonPackage rec { changelog = "https://github.com/Textualize/textual/blob/${src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ gepbird ]; - # https://github.com/Textualize/textual/issues/5868 - broken = true; }; } diff --git a/pkgs/development/python-modules/tree-sitter-rust/default.nix b/pkgs/development/python-modules/tree-sitter-rust/default.nix index f720341200b18..8820bd0680b41 100644 --- a/pkgs/development/python-modules/tree-sitter-rust/default.nix +++ b/pkgs/development/python-modules/tree-sitter-rust/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "tree-sitter-rust"; - version = "0.24.0"; + version = "0.23.2"; pyproject = true; src = fetchFromGitHub { owner = "tree-sitter"; repo = "tree-sitter-rust"; tag = "v${version}"; - hash = "sha256-y3sJURlSTM7LRRN5WGIAeslsdRZU522Tfcu6dnXH/XQ="; + hash = "sha256-aT+tlrEKMgWqTEq/NHh8Vj92h6i1aU6uPikDyaP2vfc="; }; build-system = [ diff --git a/pkgs/development/python-modules/tree-sitter/default.nix b/pkgs/development/python-modules/tree-sitter/default.nix index 19f839ffcb611..4c176538beb0b 100644 --- a/pkgs/development/python-modules/tree-sitter/default.nix +++ b/pkgs/development/python-modules/tree-sitter/default.nix @@ -2,8 +2,7 @@ lib, stdenv, buildPythonPackage, - fetchFromGitHub, - pytestCheckHook, + fetchPypi, pythonOlder, setuptools, tree-sitter-python, @@ -15,17 +14,14 @@ buildPythonPackage rec { pname = "tree-sitter"; - version = "0.24.0-unstable-2025-06-02"; + version = "0.24.0"; pyproject = true; disabled = pythonOlder "3.10"; - src = fetchFromGitHub { - owner = "tree-sitter"; - repo = "py-tree-sitter"; - rev = "9c78f3b8d10f81b97fbb2181c9333323d6375480"; - hash = "sha256-jPqTraGrYFXBlci4Zaleyp/NTQhvuI39tYWRckjnV2E="; - fetchSubmodules = true; + src = fetchPypi { + inherit pname version; + hash = "sha256-q9la9lyi9Pfso1Y0M5HtZp52Tzd0i1NSlG8A9/x45zQ="; }; # see https://github.com/tree-sitter/py-tree-sitter/issues/330#issuecomment-2629403946 @@ -36,7 +32,6 @@ buildPythonPackage rec { build-system = [ setuptools ]; nativeCheckInputs = [ - pytestCheckHook tree-sitter-python tree-sitter-rust tree-sitter-html @@ -56,21 +51,11 @@ buildPythonPackage rec { "test_dot_graphs" ]; - meta = - let - # for an -unstable version, we grab the release notes for the last tagged - # version it is based upon - lastTag = lib.pipe version [ - lib.splitVersion - (lib.take 3) - (lib.concatStringsSep ".") - ]; - in - { - description = "Python bindings to the Tree-sitter parsing library"; - homepage = "https://github.com/tree-sitter/py-tree-sitter"; - changelog = "https://github.com/tree-sitter/py-tree-sitter/releases/tag/v${lastTag}"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ fab ]; - }; + meta = { + description = "Python bindings to the Tree-sitter parsing library"; + homepage = "https://github.com/tree-sitter/py-tree-sitter"; + changelog = "https://github.com/tree-sitter/py-tree-sitter/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json index 838e798e560a5..c412e01f17350 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json @@ -1,13 +1,12 @@ { "url": "https://github.com/tree-sitter/tree-sitter-bash", - "rev": "56b54c61fb48bce0c63e3dfa2240b5d274384763", - "date": "2025-06-04T09:38:10-07:00", - "path": "/nix/store/zy2ii6304db3z54x2afg8as71wkbgffd-tree-sitter-bash", - "sha256": "1488r0lqldy92v8jr3n6w6iv99fdbcnmb1zxfshiz9azcgz8s5mx", - "hash": "sha256-vRaN/mNfpR+hdv2HVS1bzaW0o+HGjizRFsk3iinICJE=", + "rev": "487734f87fd87118028a65a4599352fa99c9cde8", + "date": "2024-11-11T01:52:16-05:00", + "path": "/nix/store/llqfabr73wh33skh2qzhwjh93zc5cy09-tree-sitter-bash", + "sha256": "1smlcfkxxknhya1b1h72zj3ccg35szbg9mii2xwh7iq9acnlzpgc", + "hash": "sha256-7N1PLVMJxwN5FzHW9NbXZTzGhvziwLCC8tDO3qdjtOo=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bibtex.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bibtex.json index 72e29abbc9084..3b1ebf2fe4d46 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bibtex.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bibtex.json @@ -1,13 +1,12 @@ { "url": "https://github.com/latex-lsp/tree-sitter-bibtex", - "rev": "8d04ed27b3bc7929f14b7df9236797dab9f3fa66", - "date": "2025-04-19T10:23:36+02:00", - "path": "/nix/store/cfx6c2nl3vmm29phi5l7yg4mq8hapqji-tree-sitter-bibtex", - "sha256": "0pjjk23a3gyz0rpgy99qkal9gs65i15k8bsc37s87x94dxdcdrah", - "hash": "sha256-UOXGWm8k9YP0GUwvNEuIxeiXqJo4Jf9uBt+/oYaYUl4=", + "rev": "ccfd77db0ed799b6c22c214fe9d2937f47bc8b34", + "date": "2021-03-26T15:53:50+01:00", + "path": "/nix/store/pg00zy53rni7znda2vbyyhkkclgja3kq-tree-sitter-bibtex", + "sha256": "0m7f3dkqbmy8x1bhl11m8f4p6n76wfvh99rp46zrqv39355nw1y2", + "hash": "sha256-wgduSxlpbJy/ITenBLfj5lhziUM1BApX6MjXhWcb7lQ=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json index 392d537fef626..35988b2c081aa 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json @@ -1,13 +1,12 @@ { "url": "https://github.com/tree-sitter/tree-sitter-c", - "rev": "7fa1be1b694b6e763686793d97da01f36a0e5c12", - "date": "2025-05-24T13:29:12-04:00", - "path": "/nix/store/bms26kscizz0zd4x18smicqz5p7va9d4-tree-sitter-c", - "sha256": "19yc4g5fdibfqbn49ggywk9k2by78s8lrsjp1cx2lagb1dvxnv42", - "hash": "sha256-gmzbdwvrKSo6C1fqTJFGxy8x0+T+vUTswm7F5sojzKc=", + "rev": "2a265d69a4caf57108a73ad2ed1e6922dd2f998c", + "date": "2025-02-08T10:48:10-06:00", + "path": "/nix/store/0xnd082cryjnml9iaibcfgbp3bc5svxb-tree-sitter-c", + "sha256": "1vw7jd3wrb4vnigfllfmqxa8fwcpvgp1invswizz0grxv249piza", + "hash": "sha256-6sebiNg9P/B/5HrbGO7bl3GHVMfVUepetJuszEeTh+8=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-comment.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-comment.json index bb3a2b8e27359..ed34fe8a5d56f 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-comment.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-comment.json @@ -1,13 +1,12 @@ { "url": "https://github.com/stsewd/tree-sitter-comment", - "rev": "689be73775bd2dd57b938b8e12bf50fec35a6ca3", - "date": "2025-05-03T18:43:55-05:00", - "path": "/nix/store/7s2q0ka47nf94kaih3w12572my3r2ksz-tree-sitter-comment", - "sha256": "1x0l8phr4x07n739z0ax8faxq0l6irmpkdprrv1z088zqdr43l1v", - "hash": "sha256-O9BBcsMfIfDDzvm2eWuOhgLclUNdgZ/GsQd0kuFFFPQ=", + "rev": "ef429992748f89e176243411e94b8ffc8777d118", + "date": "2023-06-03T20:48:17-05:00", + "path": "/nix/store/0kg71dvg10f1m2f08z1b2wh1ap4w4hw6-tree-sitter-comment", + "sha256": "1d5g69i8jplyg888yr7wzjb46cqnchwf4kdzgb83him7cwfx9wax", + "hash": "sha256-XfHUHWenRjjQer9N4jhkFjNDlvz8ZI8Qep5eiWIyr7Q=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fortran.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fortran.json index 4d5d994dd9624..cfc6a0ff44bd9 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fortran.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fortran.json @@ -1,13 +1,12 @@ { "url": "https://github.com/stadelmanma/tree-sitter-fortran", - "rev": "ab9aa007a8d982a5a7926663a8ab989cea0f5d9e", - "date": "2025-05-30T13:36:15-04:00", - "path": "/nix/store/rfny2ivglrrr0wqsby82l0yw63d3gdvp-tree-sitter-fortran", - "sha256": "13szimmilfd1lps9j73zyp4lmg630ml1gg802lsfxxdjc944yrcc", - "hash": "sha256-jGVPSGKy9e40FQC9F2gFw7xKyfV/HJn0paE5GmuNX48=", + "rev": "022b032d31299c5d8336cdfd0ece97de20a609c0", + "date": "2025-01-23T13:28:14-05:00", + "path": "/nix/store/vncpfx5db12ish9rzf26phj25373nqs4-tree-sitter-fortran", + "sha256": "1mncdji60qa9r8jbiywmcid714ylc3gniq25l8mxj1p4zq95nd29", + "hash": "sha256-STRbEv7kBtkrokXgaN9g1JNwWmSV+7gkyklhYKJszNY=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-hcl.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-hcl.json index bffd99b20a240..738b02ffdb69d 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-hcl.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-hcl.json @@ -1,13 +1,12 @@ { "url": "https://github.com/MichaHoffmann/tree-sitter-hcl", - "rev": "009def4ae38ec30e5b40beeae26efe93484ab286", - "date": "2025-05-16T09:08:19+02:00", - "path": "/nix/store/4fzs7sm98lvygqj7ylpfhg9lpkzyz8as-tree-sitter-hcl", - "sha256": "01amk7cm968a3i511kzzbyvhbxhk6h1v5g5klap7vh0y11r3ilyy", - "hash": "sha256-3tM4cggewH2uorO8sgM0E/YFt1//zxBKHAqZVNmZVQU=", + "rev": "636dbe70301ecbab8f353c8c78b3406fe4f185f5", + "date": "2023-07-25T19:21:31+02:00", + "path": "/nix/store/k5rmjfpgn4vpxxqc05xb5fflcck9645v-tree-sitter-hcl", + "sha256": "1yydi61jki7xpabi0aq6ykz4w4cya15g8rp34apb6qq9hm4lm9di", + "hash": "sha256-saVKSYUJY7OuIuNm9EpQnhFO/vQGKxCXuv3EKYOJzfs=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-hyprlang.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-hyprlang.json index 462946d0da993..f63d8243613a1 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-hyprlang.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-hyprlang.json @@ -1,13 +1,12 @@ { "url": "https://github.com/tree-sitter-grammars/tree-sitter-hyprlang", - "rev": "d0441fd4b883ecc0e70140723a1cf5907992639a", - "date": "2025-05-09T22:23:24+03:00", - "path": "/nix/store/ajpg66r1yvns2rpbspqhgh7b1ggm6jcf-tree-sitter-hyprlang", - "sha256": "171p3hj36a1jqflg9xv138445j4m4m16na6bgpm1km3l67jhvl54", - "hash": "sha256-pNAN5TF01Bnqfcsoa0IllchCCBph9/SowzIoMyQcN5w=", + "rev": "86025136c12cd1058985479a6b1935829077f1af", + "date": "2024-02-10T18:00:17+03:00", + "path": "/nix/store/q5csx65ydwbz66bgjjpa6c1yvy3zy6vq-tree-sitter-hyprlang", + "sha256": "0z84nl1mb77rwqq86ggaiqdd2lwg3nxrlkbhsn8zhcqnaphq0wfl", + "hash": "sha256-1HGA4VUWM/iR1XBNmrsdj1PRGo7qPYMw5vmcVQO1BH0=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-llvm.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-llvm.json index a97a2e58a677a..e63f2032140ef 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-llvm.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-llvm.json @@ -1,13 +1,12 @@ { "url": "https://github.com/benwilliamgraham/tree-sitter-llvm", - "rev": "1ac83114e71839fa67f4cce2f864ebbbdf6e2a4f", - "date": "2025-05-13T09:33:06+02:00", - "path": "/nix/store/yqc7r12pmy0y1bxad2cgpss5kpmd9vzr-tree-sitter-llvm", - "sha256": "00srqg073ml85zimmj1a1251nka18i04gm0m1jcpa6fmbbrx6knr", - "hash": "sha256-2U7T81rVGXWZDBXUR0BEQU0biggqyFrjL4jWccDDWQM=", + "rev": "c14cb839003348692158b845db9edda201374548", + "date": "2024-10-07T15:28:34-07:00", + "path": "/nix/store/aravnn08ip3zggkbww6ap73xb5zvrf6g-tree-sitter-llvm", + "sha256": "1fh5nq7war87zrphlv5v2g55gmsbhyv3385va7k1y8gh3czg0x9g", + "hash": "sha256-L3XwPhvwIR/mUbugMbaHS9dXyhO7bApv/gdlxQ+2Bbo=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json index fcf8e44b10a84..250b848c1bdf4 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json @@ -1,13 +1,12 @@ { "url": "https://github.com/MDeiml/tree-sitter-markdown", - "rev": "afaa4138517363362f54c89330c9d79391e81168", - "date": "2025-05-17T18:46:59+02:00", - "path": "/nix/store/46fzwyl91h2w34b73sscbjh1ggl3s15l-tree-sitter-markdown", - "sha256": "0aprf5kvqcpjx58xwdxh4lsgz6mzcsdipjv3405fywcrbh9q7li3", - "hash": "sha256-I9KDE1yZce8KIGPLG5tmv5r/NCWwN95R6fIyvGdx+So=", + "rev": "1c8dea73bc0c996d92dd9ebc30dd388716b1c5db", + "date": "2024-09-11T16:28:36+03:00", + "path": "/nix/store/g4696miy9vzcw0qwd00rar36qn08jn2l-tree-sitter-markdown", + "sha256": "13xfyclim1yql6swbk4y12sxgvn799ldbzjl35n5rrkz7wgnwm9s", + "hash": "sha256-OlVuHz9/5lxsGVT+1WhKx+7XtQiezMW1odiHGinzro8=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-query.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-query.json index 4e54ec8ca781b..4c2825dafb4ee 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-query.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-query.json @@ -1,13 +1,12 @@ { "url": "https://github.com/nvim-treesitter/tree-sitter-query", - "rev": "892ebd701a79be0412ff1478177030a725d0c7b7", - "date": "2025-05-16T18:22:36+02:00", - "path": "/nix/store/rivlmbcc3gn7fqwljgk3z7zhk2s1ivzh-tree-sitter-query", - "sha256": "0is8lzj13zz6sq36wrfmhv7mjbgfvlrqnxf5dxzqa2vncj45v0bv", - "hash": "sha256-e4FdiGR2C4V/b8V1izPd7i1Zz4bVZW4G1ub/EeSnSEc=", + "rev": "0555ac0da902abff06076e40501102cee3ba68bd", + "date": "2025-02-02T17:30:49+01:00", + "path": "/nix/store/ab5v1pf3vckwhnix7r0c1l5g8x30v4zl-tree-sitter-query", + "sha256": "0dqy7i2jdd9dqf1ppqzcmkzd9yndb11r78l0pv1zyl7dm7h5g76q", + "hash": "sha256-2JxX4KntUP/DvoCik0NYzfrU/qzs43uDwy21JkU8Hjc=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json index 4b2112b72674f..5cfe2a766547c 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json @@ -1,13 +1,12 @@ { "url": "https://github.com/tree-sitter/tree-sitter-rust", - "rev": "18b0515fca567f5a10aee9978c6d2640e878671a", - "date": "2025-04-01T14:02:57-07:00", - "path": "/nix/store/ilgg71axwwq17wcpy3sm5qkqkfh26bgd-tree-sitter-rust", - "sha256": "0x7xqxspdfnbgn9nvrsl2rsnrjbs01i5hy8k8p5wwk2j358hjyyb", - "hash": "sha256-y3sJURlSTM7LRRN5WGIAeslsdRZU522Tfcu6dnXH/XQ=", + "rev": "cad8a206f2e4194676b9699f26f6560d07130d3f", + "date": "2024-11-24T13:48:58-05:00", + "path": "/nix/store/2xxvslz0q5vl8z94hs1g8cb4x2ri2pan-tree-sitter-rust", + "sha256": "1xxxysiwj0r97sp4wsdmm23pcgsngiw39gsa9jm0achan6basgv9", + "hash": "sha256-aT+tlrEKMgWqTEq/NHh8Vj92h6i1aU6uPikDyaP2vfc=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, - "fetchTags": false, "leaveDotGit": false } diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index cf9502ed575e6..2174fba4393ff 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -494,6 +494,21 @@ let }; }; + 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 ( @@ -523,6 +538,7 @@ let inherit knownTreeSitterOrgGrammarRepos ignoredTreeSitterOrgRepos + pinnedGrammars ; } ( diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index a53e1ee62c366..3133aa3902af1 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -96,6 +96,10 @@ def fetchRepo() -> None: "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(