luaPackages.grug-far-nvim: init at 20250304

I've added the tests because I like the ability to check the behavior of
the plugin when run in the sandbox without my crazy config.
It also helps documenting how to check the plugin when running updates.
This commit is contained in:
Matthieu C.
2025-04-10 19:06:35 +02:00
committed by Matthieu Coudron
parent e3832424a1
commit 446feb2c0c
6 changed files with 53 additions and 14 deletions
@@ -26,6 +26,7 @@ funnyfiles.nvim,,,,,,mrcjkb
fzf-lua,,,,,,mrcjkb
fzy,,,,,,mrcjkb
gitsigns.nvim,https://raw.githubusercontent.com/lewis6991/gitsigns.nvim/main/gitsigns.nvim-scm-1.rockspec,,,,5.1,
grug-far.nvim,,,,,,teto
haskell-tools.nvim,,,,,,mrcjkb
http,,,,0.3-0,,vcunat
image.nvim,,,,,,teto
1 name rockspec ref server version luaversion maintainers
26 fzf-lua mrcjkb
27 fzy mrcjkb
28 gitsigns.nvim https://raw.githubusercontent.com/lewis6991/gitsigns.nvim/main/gitsigns.nvim-scm-1.rockspec 5.1
29 grug-far.nvim teto
30 haskell-tools.nvim mrcjkb
31 http 0.3-0 vcunat
32 image.nvim teto
@@ -5438,19 +5438,6 @@ final: prev: {
meta.hydraPlatforms = [ ];
};
grug-far-nvim = buildVimPlugin {
pname = "grug-far.nvim";
version = "2025-04-08";
src = fetchFromGitHub {
owner = "MagicDuck";
repo = "grug-far.nvim";
rev = "082f97122dd59d816a9a7b676d2b2f86a8ab6ed9";
sha256 = "04z8d5vh4z26d3rpf8ab78q434zsvg6h1fb7hhkd3mqk8wlv0zyw";
};
meta.homepage = "https://github.com/MagicDuck/grug-far.nvim/";
meta.hydraPlatforms = [ ];
};
gruvbox = buildVimPlugin {
pname = "gruvbox";
version = "2023-08-14";
@@ -10,6 +10,7 @@ let
luarocksPackageNames = [
"fidget-nvim"
"gitsigns-nvim"
"grug-far-nvim"
"image-nvim"
"lsp-progress-nvim"
"lualine-nvim"
@@ -416,7 +416,6 @@ https://github.com/brymer-meneses/grammar-guard.nvim/,HEAD,
https://github.com/liuchengxu/graphviz.vim/,,
https://github.com/cbochs/grapple.nvim/,HEAD,
https://github.com/blazkowolf/gruber-darker.nvim/,,
https://github.com/MagicDuck/grug-far.nvim/,,
https://github.com/morhetz/gruvbox/,,
https://github.com/luisiacc/gruvbox-baby/,HEAD,
https://github.com/gruvbox-community/gruvbox/,,gruvbox-community
@@ -926,6 +926,36 @@ final: prev: {
}
) { };
grug-far-nvim = callPackage (
{
buildLuarocksPackage,
fetchurl,
fetchzip,
luaOlder,
}:
buildLuarocksPackage {
pname = "grug-far.nvim";
version = "1.5.15-1";
knownRockspec =
(fetchurl {
url = "mirror://luarocks/grug-far.nvim-1.5.15-1.rockspec";
sha256 = "1jp6b6kqp389wli766rypam4hr6dqv6v5r8kv1dk21d7glz8hg6h";
}).outPath;
src = fetchzip {
url = "https://github.com/MagicDuck/grug-far.nvim/archive/5da116bc99a03e14be3b824e319f4e49c676af78.zip";
sha256 = "196l6vy9573fkwld3cl927706a6gfgmc71kn1kx3pmk8l6p8hcya";
};
disabled = luaOlder "5.1";
meta = {
homepage = "https://github.com/MagicDuck/grug-far.nvim";
description = "Find And Replace plugin for neovim";
license.fullName = "MIT";
};
}
) { };
http = callPackage (
{
basexx,
@@ -212,6 +212,27 @@ in
'';
});
grug-far-nvim = prev.grug-far-nvim.overrideAttrs ({
doCheck = lua.luaversion == "5.1" && !stdenv.hostPlatform.isDarwin;
nativeCheckInputs = [
final.busted
final.mini-test
final.nlua
ripgrep
neovim-unwrapped
];
# feel free to disable the checks. They are mostly screenshot based
checkPhase = ''
runHook preCheck
# feel free to disable/adjust the tests
rm tests/base/test_apply.lua tests/base/test_vimscript_interpreter.lua
make test dir=base
runHook postCheck
'';
});
http = prev.http.overrideAttrs (oa: {
patches = [
(fetchpatch {