From 7ef83af8e44542433ac8dbd9fea3eed8cb254e02 Mon Sep 17 00:00:00 2001 From: Johan Larsson Date: Fri, 10 Jan 2025 09:00:51 +0100 Subject: [PATCH] vimPlugins.gx-nvim: init at 2025-01-07 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use substituteAll instead Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com> Change string in patch Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com> Remove postPatch Make patch specific to linux Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com> --- pkgs/applications/editors/vim/plugins/generated.nix | 13 +++++++++++++ pkgs/applications/editors/vim/plugins/overrides.nix | 12 ++++++++++++ .../vim/plugins/patches/gx-nvim/fix-paths.patch | 13 +++++++++++++ .../editors/vim/plugins/vim-plugin-names | 1 + 4 files changed, 39 insertions(+) create mode 100644 pkgs/applications/editors/vim/plugins/patches/gx-nvim/fix-paths.patch diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index c9d6a47ffdd9..6ba29bb90efd 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -4907,6 +4907,19 @@ final: prev: meta.homepage = "https://github.com/junegunn/gv.vim/"; }; + gx-nvim = buildVimPlugin { + pname = "gx.nvim"; + version = "2025-01-07"; + src = fetchFromGitHub { + owner = "chrishrb"; + repo = "gx.nvim"; + rev = "c7e6a0ace694a098a5248d92a866c290bd2da1cc"; + sha256 = "14cjwnsrjdfhqx0hbd6j1b9lm668a6c3f72wklx66vp18qy0pafb"; + fetchSubmodules = true; + }; + meta.homepage = "https://github.com/chrishrb/gx.nvim/"; + }; + hardhat-nvim = buildVimPlugin { pname = "hardhat.nvim"; version = "2024-09-22"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index c2dddac4eeee..0c1dc0bd8f74 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -59,6 +59,7 @@ typescript, vim, which, + xdg-utils, xdotool, xkb-switch, xorg, @@ -1168,6 +1169,17 @@ in dependencies = [ self.guard-nvim ]; }; + gx-nvim = super.gx-nvim.overrideAttrs { + patches = lib.optionals stdenv.hostPlatform.isLinux [ + (substituteAll { + src = ./patches/gx-nvim/fix-paths.patch; + inherit xdg-utils; + }) + ]; + + nvimRequireCheck = "gx"; + }; + hardhat-nvim = super.hardhat-nvim.overrideAttrs { dependencies = with self; [ overseer-nvim diff --git a/pkgs/applications/editors/vim/plugins/patches/gx-nvim/fix-paths.patch b/pkgs/applications/editors/vim/plugins/patches/gx-nvim/fix-paths.patch new file mode 100644 index 000000000000..380a32b4d54c --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/patches/gx-nvim/fix-paths.patch @@ -0,0 +1,13 @@ +diff --git a/lua/gx/init.lua b/lua/gx/init.lua +index 12272d4..c51771a 100644 +--- a/lua/gx/init.lua ++++ b/lua/gx/init.lua +@@ -73,7 +73,7 @@ local function get_open_browser_app() + if sysname == "Darwin" then + app = "open" + elseif sysname == "Linux" then +- app = "xdg-open" ++ app = "@xdg-utils@/bin/xdg-open" + elseif sysname == "Windows_NT" then + app = "powershell.exe" + end diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index c21f5536c49b..d28bc08ec402 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -406,6 +406,7 @@ https://github.com/nvimdev/guard.nvim/,HEAD, https://github.com/nmac427/guess-indent.nvim/,HEAD, https://github.com/sjl/gundo.vim/,, https://github.com/junegunn/gv.vim/,, +https://github.com/chrishrb/gx.nvim/,HEAD, https://github.com/TheSnakeWitcher/hardhat.nvim/,HEAD, https://github.com/m4xshen/hardtime.nvim/,HEAD, https://git.sr.ht/~sircmpwn/hare.vim,HEAD,