2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, msgpack
|
|
|
|
, greenlet
|
|
|
|
, pythonOlder
|
|
|
|
, isPyPy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pynvim";
|
2021-04-12 18:23:04 +00:00
|
|
|
version = "0.4.3";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-OnlTeL3l6AkvvrOhqZvpxhPSaFVC8dsOXG/UZ+7Vbf8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace " + pytest_runner" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
msgpack
|
|
|
|
] ++ lib.optionals (!isPyPy) [
|
|
|
|
greenlet
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# Tests require pkgs.neovim which we cannot add because of circular dependency
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pynvim"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python client for Neovim";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/neovim/pynvim";
|
|
|
|
changelog = "https://github.com/neovim/pynvim/releases/tag/${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|