depot/third_party/nixpkgs/pkgs/development/python-modules/pynvim/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

54 lines
1 KiB
Nix

{ 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 ];
};
}