From 59a4dd867822a7115e5f6f844488ab00694b2c80 Mon Sep 17 00:00:00 2001 From: LeixB Date: Fri, 10 Mar 2023 13:03:55 +0100 Subject: [PATCH 1/2] lua-rocks-move-data: fix missing doc tags on luaPackages neovim plugins fixes #220199 This makes `luarocksMoveDataHook` run before `vimPluginGenTags` since it is added first to `preFixupHooks`. --- pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh b/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh index 9870c9976eae..df143ecbf9b3 100644 --- a/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh +++ b/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh @@ -12,4 +12,4 @@ luarocksMoveDataHook () { } echo "Using luarocksMoveDataHook" -preDistPhases+=" luarocksMoveDataHook" +preFixupHooks+=(luarocksMoveDataHook) From b9220710d109a9b03400d183cf08c22c4d6aead3 Mon Sep 17 00:00:00 2001 From: LeixB Date: Tue, 14 Mar 2023 12:45:33 +0100 Subject: [PATCH 2/2] neovim: add test for help tags on plugins from luaPackages --- .../editors/neovim/tests/default.nix | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/applications/editors/neovim/tests/default.nix b/pkgs/applications/editors/neovim/tests/default.nix index 8a4e86ef6551..707a310b632a 100644 --- a/pkgs/applications/editors/neovim/tests/default.nix +++ b/pkgs/applications/editors/neovim/tests/default.nix @@ -157,6 +157,28 @@ rec { ''; }); + # check that the vim-doc hook correctly generates the tag + # for neovim packages from luaPackages + # we know for a fact gitsigns-nvim has a doc folder and comes from luaPackages + checkForTagsLuaPackages = vimPlugins.gitsigns-nvim.overrideAttrs(oldAttrs: { + doInstallCheck = true; + installCheckPhase = '' + [ -f $out/doc/tags ] + ''; + }); + + nvim_with_gitsigns_plugin = neovim.override { + extraName = "-with-gitsigns-plugin"; + configure.packages.plugins = { + start = [ + vimPlugins.gitsigns-nvim + ]; + }; + }; + checkHelpLuaPackages = runTest nvim_with_gitsigns_plugin '' + export HOME=$TMPDIR + ${nvim_with_gitsigns_plugin}/bin/nvim -i NONE -c 'help gitsigns' +quitall! -e + ''; # nixpkgs should detect that no wrapping is necessary nvimShouldntWrap = wrapNeovim2 "-should-not-wrap" nvimAutoDisableWrap;