Skip to content

Commit

Permalink
luaPackages.tree-sitter-orgmode: init at 1.3.2-1, luaPackages.orgmode…
Browse files Browse the repository at this point in the history
…: init at 0.3.61-1 (NixOS#356517)
  • Loading branch information
teto authored Jan 20, 2025
2 parents 4a75ef3 + ed4efc0 commit 91d7e42
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 3 deletions.
2 changes: 2 additions & 0 deletions maintainers/scripts/luarocks-packages.csv
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ nlua,,,,,,teto
nui.nvim,,,,,,mrcjkb
nvim-cmp,https://raw.githubusercontent.com/hrsh7th/nvim-cmp/main/nvim-cmp-scm-1.rockspec,,,,,
nvim-nio,,,,,,mrcjkb
orgmode,,,,,,
pathlib.nvim,,,,,,
papis-nvim,,,,,,GaetanLepage
penlight,,,,,,alerque
Expand All @@ -148,6 +149,7 @@ tiktoken_core,,,,,,natsukium
tl,,,,,,mephistophiles
toml-edit,,,,,5.1,mrcjkb
tree-sitter-norg,,,,,5.1,mrcjkb
tree-sitter-orgmode,,,,,,
vstruct,,,,,,
vusted,,,,,,figsoda
xml2lua,,,,,,teto
45 changes: 45 additions & 0 deletions pkgs/development/lua-modules/generated-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2907,6 +2907,29 @@ buildLuarocksPackage {
};
}) {};

orgmode = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, tree-sitter-orgmode }:
buildLuarocksPackage {
pname = "orgmode";
version = "0.3.61-1";
knownRockspec = (fetchurl {
url = "mirror://luarocks/orgmode-0.3.61-1.rockspec";
sha256 = "1sdmqaq3vzpb0c74n45piqrlcw3liiqlv282nrgr16jzsz1c870g";
}).outPath;
src = fetchzip {
url = "https://github.com/nvim-orgmode/orgmode/archive/0.3.61.zip";
sha256 = "1gkpwyfvw9z92277q6311r924rmb9zidgmlr4xxkmn2xrj5qwl7x";
};

disabled = luaOlder "5.1";
propagatedBuildInputs = [ tree-sitter-orgmode ];

meta = {
homepage = "https://nvim-orgmode.github.io/";
description = "Orgmode clone written in Lua for Neovim 0.9+.";
license.fullName = "MIT";
};
}) {};

pathlib-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, nvim-nio }:
buildLuarocksPackage {
pname = "pathlib.nvim";
Expand Down Expand Up @@ -3523,6 +3546,28 @@ buildLuarocksPackage {
};
}) {};

tree-sitter-orgmode = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luarocks-build-treesitter-parser }:
buildLuarocksPackage {
pname = "tree-sitter-orgmode";
version = "1.3.2-1";
knownRockspec = (fetchurl {
url = "mirror://luarocks/tree-sitter-orgmode-1.3.2-1.rockspec";
sha256 = "1md45ic96yf3agay30w9icr9c1v5fs0p6zs4dd5d0clrsc9029c4";
}).outPath;
src = fetchzip {
url = "https://github.com/nvim-orgmode/tree-sitter-org/archive/v1.3.2.zip";
sha256 = "1y1dyabvmm2q51nmi58lv0zf7sdz066i319s5j3ch6abcm1wv24i";
};

nativeBuildInputs = [ luarocks-build-treesitter-parser ];

meta = {
homepage = "https://github.com/nvim-orgmode/tree-sitter-org";
description = "A fork of tree-sitter-org, for use with the orgmode Neovim plugin";
license.fullName = "MIT";
};
}) {};

vstruct = callPackage({ buildLuarocksPackage, fetchFromGitHub, fetchurl, luaOlder }:
buildLuarocksPackage {
pname = "vstruct";
Expand Down
24 changes: 21 additions & 3 deletions pkgs/development/lua-modules/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,12 @@ in
nativeBuildInputs = oa.nativeBuildInputs ++ [ cargo rustPlatform.cargoSetupHook ];
});

tl = prev.tl.overrideAttrs ({
preConfigure = ''
rm luarocks.lock
'';
});

toml-edit = prev.toml-edit.overrideAttrs (oa: {

cargoDeps = rustPlatform.fetchCargoTarball {
Expand Down Expand Up @@ -866,9 +872,21 @@ in
];
});

tl = prev.tl.overrideAttrs ({
preConfigure = ''
rm luarocks.lock
tree-sitter-orgmode = prev.tree-sitter-orgmode.overrideAttrs (oa: {
propagatedBuildInputs =
let
# HACK: luarocks-nix puts rockspec build dependencies in the nativeBuildInputs,
# but that doesn't seem to work
lua = lib.head oa.propagatedBuildInputs;
in
oa.propagatedBuildInputs
++ [
lua.pkgs.luarocks-build-treesitter-parser
tree-sitter
];

preInstall = ''
export HOME="$TMPDIR";
'';
});

Expand Down

0 comments on commit 91d7e42

Please sign in to comment.