diff options
author | Symphorien Gibol <symphorien+git@xlumurb.eu> | 2018-07-11 17:05:51 +0200 |
---|---|---|
committer | Symphorien Gibol <symphorien+git@xlumurb.eu> | 2018-07-24 15:02:48 +0200 |
commit | 10436a707a45f540e10d6b0cb5a2c075dff1fc66 (patch) | |
tree | 437ffa4948cc4e0502cb28fe87a51a7d504676a8 /pkgs | |
parent | cc700ad55b3fc4bc257826b3167c3a1247b50a5b (diff) | |
download | nixlib-10436a707a45f540e10d6b0cb5a2c075dff1fc66.tar nixlib-10436a707a45f540e10d6b0cb5a2c075dff1fc66.tar.gz nixlib-10436a707a45f540e10d6b0cb5a2c075dff1fc66.tar.bz2 nixlib-10436a707a45f540e10d6b0cb5a2c075dff1fc66.tar.lz nixlib-10436a707a45f540e10d6b0cb5a2c075dff1fc66.tar.xz nixlib-10436a707a45f540e10d6b0cb5a2c075dff1fc66.tar.zst nixlib-10436a707a45f540e10d6b0cb5a2c075dff1fc66.zip |
neovim wrapper: do not unset PYTHONPATH
This solves the following bug: opening neovim in nix-shell -p pythonPackages.numpy does not enable to run successfully :!python -c "import numpy" because the PYTHONPATH is wiped by the neovim wrapper. This wiping is necessary for the python providers, though, otherwise a python2 nix-shell will make the python3 provider read python2 files. We wrap the providers only, instead of neovim as whole.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/editors/neovim/wrapper.nix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix index fa0603255599..a57831ba03c0 100644 --- a/pkgs/applications/editors/neovim/wrapper.nix +++ b/pkgs/applications/editors/neovim/wrapper.nix @@ -63,7 +63,6 @@ let --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"}\" " \ - --unset PYTHONPATH \ ${optionalString withRuby '' --suffix PATH : ${rubyEnv}/bin --set GEM_HOME ${rubyEnv}/${rubyEnv.ruby.gemPath}'' } '' @@ -75,9 +74,9 @@ let --replace 'Name=Neovim' 'Name=WrappedNeovim' '' + optionalString withPython '' - ln -s ${pythonEnv}/bin/python $out/bin/nvim-python + makeWrapper ${pythonEnv}/bin/python $out/bin/nvim-python --unset PYTHONPATH '' + optionalString withPython3 '' - ln -s ${python3Env}/bin/python3 $out/bin/nvim-python3 + makeWrapper ${python3Env}/bin/python3 $out/bin/nvim-python3 --unset PYTHONPATH '' + optionalString withRuby '' ln -s ${rubyEnv}/bin/neovim-ruby-host $out/bin/nvim-ruby '' |