Skip to content

kak-tree-sitter: add option to prebuild and bundle parsers#518336

Open
rhelmot wants to merge 1 commit into
NixOS:masterfrom
rhelmot:kak-tree-sitter-complete
Open

kak-tree-sitter: add option to prebuild and bundle parsers#518336
rhelmot wants to merge 1 commit into
NixOS:masterfrom
rhelmot:kak-tree-sitter-complete

Conversation

@rhelmot

@rhelmot rhelmot commented May 9, 2026

Copy link
Copy Markdown
Contributor

I'm working on a kakoune nixos module, and this seems like a meaningful unit to contribute right now.

Normally, you're supposed to use ktsctl at runtime to build the tree sitter parsers. This is not very nix-y, and furthermore is kind of annoying to have to do on each of my machines! Also, if we're using tinycc for the compiler, we're missing out on a lot of good compiler optimizations from gcc and clang!

This PR adds a parameter to the kak-tree-sitter wrapper which indicates which parsers to automatically bundle. In order to make them available at runtime, it wraps the kak-tree-sitter binary to link them into the user's $XDG_DATA_HOME, which is the only place that it knows to look for them...

Also adds toplevel kak-tree-sitter-complete which shortcuts bundling all parsers, both for convenience and to get them into hydra.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci Bot requested a review from lelgenio May 9, 2026 09:39
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 6.topic: tree-sitter Tree-sitter is a parser generator tool and an incremental parsing library. labels May 9, 2026
@rhelmot rhelmot force-pushed the kak-tree-sitter-complete branch from c6b137c to 3e611b7 Compare May 9, 2026 09:48
@rhelmot rhelmot changed the base branch from master to staging May 9, 2026 09:49
@nixpkgs-ci nixpkgs-ci Bot closed this May 9, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this May 9, 2026
@rhelmot

rhelmot commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Hilariously, since we "add a new package" and I have to adjust the old package to use __structuredAttrs and so forth, we have to target staging since #510526 hasn't made it to master.

@nixpkgs-ci nixpkgs-ci Bot removed 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels May 9, 2026
@MattSturgeon

Copy link
Copy Markdown
Contributor

#510526 hasn't made it to master.

FYI it's on master now

@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 22, 2026
@rhelmot rhelmot changed the base branch from staging to master June 30, 2026 03:05
@nixpkgs-ci nixpkgs-ci Bot closed this Jun 30, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Jun 30, 2026
@rhelmot rhelmot force-pushed the kak-tree-sitter-complete branch from 3e611b7 to f532a01 Compare June 30, 2026 03:07
@nixpkgs-ci nixpkgs-ci Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 30, 2026
@rhelmot

rhelmot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

FYI it's on master now

And so indeed does this PR target master again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: tree-sitter Tree-sitter is a parser generator tool and an incremental parsing library. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants