Merge pull request #32738 from LambdaP/neovim-viAlias-option

neovim: add viAlias argument
This commit is contained in:
Orivej Desh 2017-12-16 21:43:46 +00:00 committed by GitHub
commit 8dc107be5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@
, withPyGUI ? false
, vimAlias ? false
, viAlias ? false
, configure ? null
}:
@ -174,7 +175,9 @@ let
};
};
in if (vimAlias == false && configure == null) then neovim else stdenv.mkDerivation {
in if (vimAlias == false && viAlias == false && configure == null)
then neovim
else stdenv.mkDerivation {
name = "neovim-${neovim.version}-configured";
inherit (neovim) version meta;
@ -187,6 +190,8 @@ in if (vimAlias == false && configure == null) then neovim else stdenv.mkDerivat
done
'' + optionalString vimAlias ''
ln -s $out/bin/nvim $out/bin/vim
'' + optionalString viAlias ''
ln -s $out/bin/nvim $out/bin/vi
'' + optionalString (configure != null) ''
wrapProgram $out/bin/nvim --add-flags "-u ${vimUtils.vimrcFile configure}"
'';