about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pynvim/default.nix
blob: c17df538693867eb8a4aa78bcad4957f2a303d78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  msgpack,
  greenlet,
  pythonOlder,
  isPyPy,
}:

buildPythonPackage rec {
  pname = "pynvim";
  version = "0.5.0";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "neovim";
    repo = "pynvim";
    rev = "refs/tags/${version}";
    hash = "sha256-3LqgKENFzdfCjMlD6Xzv5W23yvIkNMUYo2+LlzKZ3cc=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace " + pytest_runner" ""
  '';

  buildInputs = [ setuptools ];

  propagatedBuildInputs = [ msgpack ] ++ lib.optionals (!isPyPy) [ greenlet ];

  # Tests require pkgs.neovim which we cannot add because of circular dependency
  doCheck = false;

  pythonImportsCheck = [ "pynvim" ];

  meta = with lib; {
    description = "Python client for Neovim";
    homepage = "https://github.com/neovim/pynvim";
    changelog = "https://github.com/neovim/pynvim/releases/tag/${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ figsoda ];
  };
}