forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vim-plugins: vim-go: provide the binaries required for the plugin to …
…be functional
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Mic92
|
||
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 | ||
|
@kalbasit why is motion in the list here? This seems unrelated: https://github.com/NixOS/nixpkgs/pull/50339/files#diff-b09cd8dc2a897651b30eedefe408d329R21