neovim: uses vimUtils to make it configurable like vim_configurable is
- vimAlias argument , when true, will create a @out/bin/vim symlink - configure argument, which will configure neovim the same way as it does vim_configurable. eg.: ~/.nixpkgs/config.nix { packageOverrides = pkgs : with pkgs; rec { vimg = neovim.override { vimAlias = true; configure = { customRC = '' set spell ''; vam.pluginDictionaries = [ { names = [ "youcompleteme" "ctrlp"]; } ]; }; }; }; } Enjoy!
This commit is contained in:
parent
6125f583e6
commit
19248c309a
@ -1,9 +1,13 @@
|
|||||||
{ stdenv, fetchFromGitHub, cmake, gettext, glib, libmsgpack
|
{ stdenv, fetchFromGitHub, cmake, gettext, glib, libmsgpack, libtermkey
|
||||||
, libtermkey, libtool, libuv, lpeg, lua, luajit, luaMessagePack
|
, libtool, libuv, lpeg, lua, luajit, luaMessagePack, luabitop, ncurses, perl
|
||||||
, luabitop, ncurses, perl, pkgconfig, unibilium, makeWrapper
|
, pkgconfig, unibilium, makeWrapper, vimUtils
|
||||||
|
|
||||||
, withPython ? true, pythonPackages, extraPythonPackages ? []
|
, withPython ? true, pythonPackages, extraPythonPackages ? []
|
||||||
, withPython3 ? true, python3Packages, extraPython3Packages ? []
|
, withPython3 ? true, python3Packages, extraPython3Packages ? []
|
||||||
, withJemalloc ? true, jemalloc
|
, withJemalloc ? true, jemalloc
|
||||||
|
|
||||||
|
, vimAlias ? false
|
||||||
|
, configure ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -48,7 +52,7 @@ let
|
|||||||
ignoreCollisions = true;
|
ignoreCollisions = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
neovim = stdenv.mkDerivation rec {
|
||||||
name = "neovim-${version}";
|
name = "neovim-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -115,7 +119,22 @@ in stdenv.mkDerivation rec {
|
|||||||
# those contributions were copied from Vim (identified in the commit logs
|
# those contributions were copied from Vim (identified in the commit logs
|
||||||
# by the vim-patch token). See LICENSE for details."
|
# by the vim-patch token). See LICENSE for details."
|
||||||
license = with licenses; [ asl20 vim ];
|
license = with licenses; [ asl20 vim ];
|
||||||
maintainers = with maintainers; [ manveru nckx ];
|
maintainers = with maintainers; [ manveru nckx garbas ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in if (vimAlias == false && configure == null) then neovim else stdenv.mkDerivation rec {
|
||||||
|
name = "neovim-${version}-configured";
|
||||||
|
buildInputs = [ makeWrapper ];
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
for item in ${neovim}/bin/*; do
|
||||||
|
ln -s $item $out/bin/
|
||||||
|
done
|
||||||
|
'' + optionalString vimAlias ''
|
||||||
|
ln -s $out/bin/nvim $out/bin/vim
|
||||||
|
'' + optionalString (configure != null) ''
|
||||||
|
wrapProgram $out/bin/nvim --add-flags "-u ${vimUtils.vimrcFile configure}"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user