diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 4b41b7887512..75c4b687ecac 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -78,6 +78,7 @@ luaossl,,,,,5.1, luaposix,,,,34.1.1-1,,vyp lblasc luarepl,,,,,, luarocks-build-rust-mlua,,,,,,mrcjkb +luarocks-build-treesitter-parser,,,,,,mrcjkb luasec,,,,,,flosse luasnip,,,,,, luasocket,,,,,, @@ -131,6 +132,7 @@ tiktoken_core,,,,,,natsukium tl,,,,,,mephistophiles toml,,,,,,mrcjkb toml-edit,,,,,5.1,mrcjkb +tree-sitter-norg,,,,,5.1,mrcjkb vstruct,https://github.com/ToxicFrog/vstruct.git,,,,, vusted,,,,,,figsoda xml2lua,,,,,,teto diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 8200381b5994..0c8214d3da26 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -2332,6 +2332,30 @@ buildLuarocksPackage { }; }) {}; +luarocks-build-treesitter-parser = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder, luafilesystem }: +buildLuarocksPackage { + pname = "luarocks-build-treesitter-parser"; + version = "2.0.0-1"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/luarocks-build-treesitter-parser-2.0.0-1.rockspec"; + sha256 = "0ylax1r0yl5k742p8n0fq5irs2r632npigqp1qckfx7kwi89gxhb"; + }).outPath; + src = fetchzip { + url = "https://github.com/nvim-neorocks/luarocks-build-treesitter-parser/archive/v2.0.0.zip"; + sha256 = "0gqiwk7dk1xn5n2m0iq5c7xkrgyaxwyd1spb573l289gprvlrbn5"; + }; + + disabled = (luaOlder "5.1"); + propagatedBuildInputs = [ lua luafilesystem ]; + + meta = { + homepage = "https://github.com/nvim-neorocks/luarocks-build-treesitter-parser"; + description = "A luarocks build backend for tree-sitter parsers."; + maintainers = with lib.maintainers; [ mrcjkb ]; + license.fullName = "MIT"; + }; +}) {}; + luasec = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder, luasocket }: buildLuarocksPackage { pname = "luasec"; @@ -3669,6 +3693,27 @@ buildLuarocksPackage { }; }) {}; +tree-sitter-norg = callPackage({ buildLuarocksPackage, fetchurl, fetchzip }: +buildLuarocksPackage { + pname = "tree-sitter-norg"; + version = "0.2.4-1"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/tree-sitter-norg-0.2.4-1.rockspec"; + sha256 = "00mgn1kmhhrink64s1yjnz78lc7qbv0f021dsvr6z3b44srhcxb9"; + }).outPath; + src = fetchzip { + url = "https://github.com/nvim-neorg/tree-sitter-norg/archive/v0.2.4.zip"; + sha256 = "08bsk3v61r0xhracanjv25jccqv80ahipx0mv5a1slzhcyymv8kd"; + }; + + + meta = { + homepage = "https://github.com/nvim-neorg/tree-sitter-norg"; + description = "The official tree-sitter parser for Norg documents."; + license.fullName = "MIT"; + }; +}) {}; + vstruct = callPackage({ buildLuarocksPackage, fetchgit, lua, luaOlder }: buildLuarocksPackage { pname = "vstruct"; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 45ee1ba28262..f022aa6172db 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -6,6 +6,7 @@ # plenary utilities , which , findutils +, clang , coreutils , curl , cyrus_sasl @@ -47,6 +48,7 @@ , sol2 , sqlite , tomlplusplus +, tree-sitter , unbound , vimPlugins , vimUtils @@ -729,6 +731,20 @@ in }); + tree-sitter-norg = prev.tree-sitter-norg.overrideAttrs (oa: { + nativeBuildInputs = let + # HACK: luarocks-nix doesn't pick up rockspec build dependencies, + # so we have to pass the correct package in here. + lua = lib.head oa.propagatedBuildInputs; + in oa.nativeBuildInputs ++ [ + lua.pkgs.luarocks-build-treesitter-parser + ] ++ (lib.optionals stdenv.isDarwin [ + clang + tree-sitter + ]); + meta.broken = (luaOlder "5.1" || stdenv.isDarwin); + }); + vstruct = prev.vstruct.overrideAttrs (_: { meta.broken = (luaOlder "5.1" || luaAtLeast "5.4"); });