I’m trying to get the neovim-nightly overlay working with Python support, and I’m confused about why pynvim isn’t accessible when added to home.packages
:
$ python
Python 3.8.9 (default, Apr 2 2021, 11:20:07)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import neovim
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'neovim'
But it is accessible when run from nix-shell:
$ nix-shell -p python38Packages.pynvim
[nix-shell:~]$ python
Python 3.8.9 (default, Apr 2 2021, 11:20:07)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import neovim
>>> neovim
<module 'neovim' from '/nix/store/4hwxwz7ihqkmf4xi0d6g8iy4rr2r3m72-python3.8-pynvim-0.4.3/lib/python3.8/site-packages/neovim/__init__.py'>
Relevant parts of my home-manager config:
...
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz;
}))
];
home.packages = with pkgs; [
neovim-nightly
python38Full
python38Packages.ipython
python38Packages.pynvim
python38Packages.jedi
python38Packages.python-language-server
...
I’d love to be able to run nvim outside of a nix-shell and have Python work. Any ideas what I might be doing wrong?