summary refs log tree commit diff
path: root/pkgs/misc/vim-plugins
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-11-04 17:30:33 +0000
committerGitHub <noreply@github.com>2018-11-04 17:30:33 +0000
commit2a3aa769a033b1b763c24188d45d409c8abc88c6 (patch)
tree54a927bb2c35b219614e30e5ea2f4b78739c9777 /pkgs/misc/vim-plugins
parent3e287ac2d2a80b05eb31a212d9c9ef2eebbf21f6 (diff)
parente09e5297d3cf26472ebb2b4fd80cec2eb56f0f15 (diff)
downloadnixpkgs-2a3aa769a033b1b763c24188d45d409c8abc88c6.tar
nixpkgs-2a3aa769a033b1b763c24188d45d409c8abc88c6.tar.gz
nixpkgs-2a3aa769a033b1b763c24188d45d409c8abc88c6.tar.bz2
nixpkgs-2a3aa769a033b1b763c24188d45d409c8abc88c6.tar.lz
nixpkgs-2a3aa769a033b1b763c24188d45d409c8abc88c6.tar.xz
nixpkgs-2a3aa769a033b1b763c24188d45d409c8abc88c6.tar.zst
nixpkgs-2a3aa769a033b1b763c24188d45d409c8abc88c6.zip
Merge pull request #49669 from kalbasit/nixpkgs_provide-binaries-for-vim-go
Provide all the binaries needed by the vim-go plugin
Diffstat (limited to 'pkgs/misc/vim-plugins')
-rw-r--r--pkgs/misc/vim-plugins/overrides.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix
index 8ed7a944671..c1bd45a6b78 100644
--- a/pkgs/misc/vim-plugins/overrides.nix
+++ b/pkgs/misc/vim-plugins/overrides.nix
@@ -9,6 +9,12 @@
 , languagetool
 , Cocoa, CoreFoundation, CoreServices
 , buildVimPluginFrom2Nix
+
+# vim-go denpencies
+, asmfmt, delve, errcheck, godef, golint
+, gomodifytags, gotags, gotools, motion
+, gnused, reftools, gogetdoc, gometalinter
+, impl, iferr
 }:
 
 let
@@ -247,6 +253,34 @@ with generated;
     dependencies = ["vim-misc"];
   });
 
+  # change the go_bin_path to point to a path in the nix store. See the code in
+  # fatih/vim-go here
+  # https://github.com/fatih/vim-go/blob/155836d47052ea9c9bac81ba3e937f6f22c8e384/autoload/go/path.vim#L154-L159
+  vim-go = vim-go.overrideAttrs(old: let
+    binPath = lib.makeBinPath [
+      asmfmt
+      delve
+      errcheck
+      godef
+      gogetdoc
+      golint
+      gometalinter
+      gomodifytags
+      gotags
+      gotools
+      iferr
+      impl
+      motion
+      reftools
+    ];
+    in {
+    postPatch = ''
+      ${gnused}/bin/sed \
+        -Ee 's@let go_bin_path = go#path#BinPath\(\)@let go_bin_path = "${binPath}"@g' \
+        -i autoload/go/path.vim
+    '';
+  });
+
   vim-grammarous = vim-grammarous.overrideAttrs(old: {
     # use `:GrammarousCheck` to initialize checking
     # In neovim, you also want to use set