From 85c591ae348aa45c6664c924a2b4af0966da62fe Mon Sep 17 00:00:00 2001 From: tsandrini Date: Thu, 5 Dec 2024 14:44:13 +0100 Subject: [PATCH] vimPlugins.aw-watcher-vim: init at 2023-10-09 --- pkgs/applications/editors/vim/plugins/generated.nix | 12 ++++++++++++ pkgs/applications/editors/vim/plugins/overrides.nix | 9 +++++++++ .../patches/aw-watcher-vim/program_paths.patch | 13 +++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 pkgs/applications/editors/vim/plugins/patches/aw-watcher-vim/program_paths.patch diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 87de33eff6ef..a49b622e57ff 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -1037,6 +1037,18 @@ final: prev: meta.homepage = "https://github.com/yetone/avante.nvim/"; }; + aw-watcher-vim = buildVimPlugin { + pname = "aw-watcher-vim"; + version = "2023-10-09"; + src = fetchFromGitHub { + owner = "ActivityWatch"; + repo = "aw-watcher-vim"; + rev = "4ba86d05a940574000c33f280fd7f6eccc284331"; + sha256 = "0kzpr2dgn80lcqbbf9ig6vx7azz6vbvadi31mxb0qyd91fyiidi3"; + }; + meta.homepage = "https://github.com/ActivityWatch/aw-watcher-vim/"; + }; + awesome-vim-colorschemes = buildVimPlugin { pname = "awesome-vim-colorschemes"; version = "2024-05-18"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index b5ff7ce37fef..427732414a7a 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -258,6 +258,15 @@ in } ); + aw-watcher-vim = super.aw-watcher-vim.overrideAttrs { + patches = [ + (substituteAll { + src = ./patches/aw-watcher-vim/program_paths.patch; + curl = lib.getExe curl; + }) + ]; + }; + bamboo-nvim = super.bamboo-nvim.overrideAttrs { nvimSkipModule = [ # Requires config table diff --git a/pkgs/applications/editors/vim/plugins/patches/aw-watcher-vim/program_paths.patch b/pkgs/applications/editors/vim/plugins/patches/aw-watcher-vim/program_paths.patch new file mode 100644 index 000000000000..857327664108 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/patches/aw-watcher-vim/program_paths.patch @@ -0,0 +1,13 @@ +diff --git a/plugin/activitywatch.vim b/plugin/activitywatch.vim +index 6986553..7462b02 100644 +--- a/plugin/activitywatch.vim ++++ b/plugin/activitywatch.vim +@@ -29,7 +29,7 @@ let s:heartbeat_apiurl = printf('%s/heartbeat?pulsetime=30', s:bucket_apiurl) + let s:http_response_code = {} + + function! HTTPPostJson(url, data) +- let l:req = ['curl', '-s', a:url, ++ let l:req = ['@curl@', '-s', a:url, + \ '-H', 'Content-Type: application/json', + \ '-X', 'POST', + \ '-d', json_encode(a:data),