diff options
author | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2018-11-07 12:38:18 -0800 |
---|---|---|
committer | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2018-11-14 19:54:47 -0800 |
commit | da4a004193614945641c0a634855deec926b089b (patch) | |
tree | 148120ed2cfc215fa6485d4586c6aaecf3544b65 /pkgs/applications/editors/neovim | |
parent | 657e18e0119baa29ed3dbb6bfdc0c40f13bf32c1 (diff) | |
download | nixlib-da4a004193614945641c0a634855deec926b089b.tar nixlib-da4a004193614945641c0a634855deec926b089b.tar.gz nixlib-da4a004193614945641c0a634855deec926b089b.tar.bz2 nixlib-da4a004193614945641c0a634855deec926b089b.tar.lz nixlib-da4a004193614945641c0a634855deec926b089b.tar.xz nixlib-da4a004193614945641c0a634855deec926b089b.tar.zst nixlib-da4a004193614945641c0a634855deec926b089b.zip |
neovim wrapper: add withNodeJs to build wrapper with nodejs support
Diffstat (limited to 'pkgs/applications/editors/neovim')
-rw-r--r-- | pkgs/applications/editors/neovim/wrapper.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix index 568043f96687..bd4304560fd1 100644 --- a/pkgs/applications/editors/neovim/wrapper.nix +++ b/pkgs/applications/editors/neovim/wrapper.nix @@ -1,6 +1,8 @@ { stdenv, lib, makeWrapper , vimUtils , bundlerEnv, ruby +, nodejs +, nodePackages , pythonPackages , python3Packages }: @@ -12,6 +14,7 @@ let wrapper = { withPython ? true, extraPythonPackages ? (_: []) /* the function you would have passed to python.withPackages */ , withPython3 ? true, extraPython3Packages ? (_: []) /* the function you would have passed to python.withPackages */ + , withNodeJs? false , withRuby ? true , withPyGUI ? false , vimAlias ? false @@ -50,6 +53,8 @@ let ++ (extraPython3PackagesFun ps) ++ (concatMap (f: f ps) pluginPython3Packages)); + binPath = makeBinPath (optionals withRuby [rubyEnv] ++ optionals withNodeJs [nodejs]); + in stdenv.mkDerivation { name = "neovim-${stdenv.lib.getVersion neovim}"; @@ -62,10 +67,12 @@ let makeWrapper "$(readlink -v --canonicalize-existing "${bin}")" \ "$out/bin/nvim" --add-flags " \ + --cmd \"${if withNodeJs then "let g:node_host_prog='${nodePackages.neovim}/bin/neovim-node-host'" else "let g:loaded_node_provider=1"}\" \ --cmd \"${if withPython then "let g:python_host_prog='$out/bin/nvim-python'" else "let g:loaded_python_provider = 1"}\" \ --cmd \"${if withPython3 then "let g:python3_host_prog='$out/bin/nvim-python3'" else "let g:loaded_python3_provider = 1"}\" \ --cmd \"${if withRuby then "let g:ruby_host_prog='$out/bin/nvim-ruby'" else "let g:loaded_ruby_provider=1"}\" " \ - ${optionalString withRuby '' --suffix PATH : ${rubyEnv}/bin --set GEM_HOME ${rubyEnv}/${rubyEnv.ruby.gemPath}'' } + --suffix PATH : ${binPath} \ + ${optionalString withRuby '' --set GEM_HOME ${rubyEnv}/${rubyEnv.ruby.gemPath}'' } '' + optionalString (!stdenv.isDarwin) '' |