notmuch: install the vim plugin

Install the vim plugin to $out/share/vim-plugins/notmuch and
$out/share/nvim/site/plugin/notmuch.vim. It is only static files and
doesn't add any dependency so it is enabled by default. Add `withVim`
argument to override this.

Co-authored-by: Jules Aguillon <juloo.dsi@gmail.com>
This commit is contained in:
Jules Aguillon
2024-05-02 15:41:48 +01:00
committed by Ryan Gibb
parent aeebce2b87
commit 39b74baeb3
@@ -12,6 +12,7 @@
, withEmacs ? true
, withRuby ? true
, withSfsexp ? true # also installs notmuch-git, which requires sexp-support
, withVim ? true
}:
stdenv.mkDerivation rec {
@@ -133,6 +134,10 @@ stdenv.mkDerivation rec {
+ lib.optionalString withSfsexp ''
cp notmuch-git $out/bin/notmuch-git
wrapProgram $out/bin/notmuch-git --prefix PATH : $out/bin:${lib.getBin git}/bin
'' + lib.optionalString withVim ''
make -C vim DESTDIR="$out/share/vim-plugins/notmuch" prefix="" install
mkdir -p $out/share/nvim
ln -s $out/share/vim-plugins/notmuch $out/share/nvim/site
'';
passthru = {