1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 msgpack,
7 isPyPy,
8 greenlet,
9 pythonOlder,
10 typing-extensions,
11}:
12
13buildPythonPackage rec {
14 pname = "pynvim";
15 version = "0.5.2";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "neovim";
20 repo = "pynvim";
21 tag = version;
22 hash = "sha256-/frugwYPS4rS4L6BRsmNb5pJI8xfLJvbr+PyOLx25a4=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies =
28 [ msgpack ]
29 ++ lib.optionals (!isPyPy) [ greenlet ]
30 ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];
31
32 # Tests require pkgs.neovim which we cannot add because of circular dependency
33 doCheck = false;
34
35 pythonImportsCheck = [ "pynvim" ];
36
37 meta = {
38 description = "Python client for Neovim";
39 homepage = "https://github.com/neovim/pynvim";
40 changelog = "https://github.com/neovim/pynvim/releases/tag/${version}";
41 license = lib.licenses.asl20;
42 maintainers = with lib.maintainers; [ figsoda ];
43 };
44}