luaPackages.ltreesitter: init -> 0.2.0-1

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman
2026-04-04 12:32:06 -05:00
parent 7968a7d4be
commit 983d1dd268
3 changed files with 44 additions and 0 deletions
@@ -53,6 +53,7 @@ lrexlib-posix,,,,,,
lsp-progress.nvim,,,,,5.1,gepbird
lsqlite3,,,,,,
ltreesitter-ts,,,,,,
ltreesitter,,,,,,
lua-cjson,,,,,,
lua-cmsgpack,,,,,,
lua-curl,,,,,,
1 name rockspec ref server version luaversion maintainers
53 lsp-progress.nvim 5.1 gepbird
54 lsqlite3
55 ltreesitter-ts
56 ltreesitter
57 lua-cjson
58 lua-cmsgpack
59 lua-curl
@@ -1912,6 +1912,35 @@ final: prev: {
}
) { };
ltreesitter = callPackage (
{
buildLuarocksPackage,
fetchFromGitHub,
fetchurl,
}:
buildLuarocksPackage {
pname = "ltreesitter";
version = "0.2.0-1";
knownRockspec =
(fetchurl {
url = "mirror://luarocks/ltreesitter-0.2.0-1.rockspec";
sha256 = "0qhmx73hkskzmf5s3yv843234ri8n3gqj4dad79b018j5ilwiria";
}).outPath;
src = fetchFromGitHub {
owner = "euclidianAce";
repo = "ltreesitter";
tag = "v0.2.0";
hash = "sha256-PYM6UAwp8w0qZxua5G6RFXI78Q6L3Vlc3eolXlNrN8k=";
};
meta = {
homepage = "https://github.com/euclidianAce/ltreesitter";
description = "Treesitter bindings to Lua";
license.fullName = "MIT";
};
}
) { };
ltreesitter-ts = callPackage (
{
buildLuarocksPackage,
@@ -435,6 +435,20 @@ in
buildInputs = old.buildInputs ++ [ sqlite.dev ];
});
ltreesitter = prev.ltreesitter.overrideAttrs (old: {
buildInputs = (old.buildInputs or [ ]) ++ [
tree-sitter
];
postConfigure = (old.postConfigure or "") + ''
substituteInPlace ''${rockspecFilename} \
--replace-fail '"tree-sitter/lib/src/lib.c",' "" \
--replace-fail '"tree-sitter/lib/include",' '"${tree-sitter}/include"' \
--replace-fail '"tree-sitter/lib/src"' ""
'';
NIX_CFLAGS_COMPILE = "-I${tree-sitter}/include";
NIX_LDFLAGS = "-L${tree-sitter}/lib -ltree-sitter";
});
ltreesitter-ts = prev.ltreesitter-ts.overrideAttrs (old: {
# Upstream package relies on git submodules (ltreesitter + tree-sitter),
# but the default source fetch misses those files.