1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 msgpack,
7 greenlet,
8 pythonOlder,
9 isPyPy,
10}:
11
12buildPythonPackage rec {
13 pname = "pynvim";
14 version = "0.5.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "neovim";
21 repo = "pynvim";
22 rev = "refs/tags/${version}";
23 hash = "sha256-3LqgKENFzdfCjMlD6Xzv5W23yvIkNMUYo2+LlzKZ3cc=";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace " + pytest_runner" ""
29 '';
30
31 buildInputs = [ setuptools ];
32
33 propagatedBuildInputs = [ msgpack ] ++ lib.optionals (!isPyPy) [ greenlet ];
34
35 # Tests require pkgs.neovim which we cannot add because of circular dependency
36 doCheck = false;
37
38 pythonImportsCheck = [ "pynvim" ];
39
40 meta = with lib; {
41 description = "Python client for Neovim";
42 homepage = "https://github.com/neovim/pynvim";
43 changelog = "https://github.com/neovim/pynvim/releases/tag/${version}";
44 license = licenses.asl20;
45 maintainers = with maintainers; [ figsoda ];
46 };
47}