about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pynvim/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pynvim/default.nix')
-rw-r--r--pkgs/development/python-modules/pynvim/default.nix51
1 files changed, 20 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/pynvim/default.nix b/pkgs/development/python-modules/pynvim/default.nix
index 829ec7d68b12..3897b971e32c 100644
--- a/pkgs/development/python-modules/pynvim/default.nix
+++ b/pkgs/development/python-modules/pynvim/default.nix
@@ -1,54 +1,43 @@
-{ lib
-, buildPythonPackage
-, fetchFromGitHub
-, setuptools
-, msgpack
-, greenlet
-, pythonOlder
-, isPyPy
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  setuptools,
+  msgpack,
+  isPyPy,
+  greenlet,
+  pythonOlder,
+  typing-extensions,
 }:
 
 buildPythonPackage rec {
   pname = "pynvim";
-  version = "0.5.0";
+  version = "0.5.2";
   pyproject = true;
 
-  disabled = pythonOlder "3.7";
-
   src = fetchFromGitHub {
     owner = "neovim";
     repo = "pynvim";
     rev = "refs/tags/${version}";
-    hash = "sha256-3LqgKENFzdfCjMlD6Xzv5W23yvIkNMUYo2+LlzKZ3cc=";
+    hash = "sha256-/frugwYPS4rS4L6BRsmNb5pJI8xfLJvbr+PyOLx25a4=";
   };
 
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace " + pytest_runner" ""
-  '';
-
-  buildInputs = [
-    setuptools
-  ];
+  build-system = [ setuptools ];
 
-  propagatedBuildInputs = [
-    msgpack
-  ] ++ lib.optionals (!isPyPy) [
-    greenlet
-  ];
+  dependencies =
+    [ msgpack ]
+    ++ lib.optionals (!isPyPy) [ greenlet ] ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];
 
   # Tests require pkgs.neovim which we cannot add because of circular dependency
   doCheck = false;
 
-  pythonImportsCheck = [
-    "pynvim"
-  ];
+  pythonImportsCheck = [ "pynvim" ];
 
-  meta = with lib; {
+  meta = {
     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 ];
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ figsoda ];
   };
 }