about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/urwid/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/urwid/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/urwid/default.nix53
1 files changed, 42 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/urwid/default.nix b/nixpkgs/pkgs/development/python-modules/urwid/default.nix
index 66a8d830cc2d..cf42463c19b2 100644
--- a/nixpkgs/pkgs/development/python-modules/urwid/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/urwid/default.nix
@@ -1,26 +1,32 @@
 { lib
 , buildPythonPackage
+, exceptiongroup
 , fetchFromGitHub
-
-# build-system
-, setuptools
-, setuptools-scm
-
-# tests
 , glibcLocales
+, pygobject3
+, pyserial
 , pytestCheckHook
+, pythonOlder
+, pyzmq
+, setuptools
+, setuptools-scm
+, tornado
+, trio
+, twisted
 }:
 
 buildPythonPackage rec {
   pname = "urwid";
-  version = "2.2.3";
-  format = "pyproject";
+  version = "2.4.3";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "urwid";
     repo = "urwid";
     rev = "refs/tags/${version}";
-    hash = "sha256-oPb2h/+gaqkZTXIiESjExMfBNnOzDvoMkXvkZ/+KVwo=";
+    hash = "sha256-raDsUZaXBC4s/48KNH8Thrpm8Bq8wj9+Rahk+LkxcDo=";
   };
 
   postPatch = ''
@@ -32,10 +38,35 @@ buildPythonPackage rec {
     setuptools-scm
   ];
 
+  passthru.optional-dependencies = {
+    glib = [
+      pygobject3
+    ];
+    tornado = [
+      tornado
+    ];
+    trio = [
+      exceptiongroup
+      trio
+    ];
+    twisted = [
+      twisted
+    ];
+    zmq = [
+      pyzmq
+    ];
+    serial = [
+      pyserial
+    ];
+    lcd = [
+      pyserial
+    ];
+  };
+
   nativeCheckInputs = [
     glibcLocales
     pytestCheckHook
-  ];
+  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
 
   env.LC_ALL = "en_US.UTF8";
 
@@ -53,8 +84,8 @@ buildPythonPackage rec {
   ];
 
   meta = with lib; {
-    changelog = "https://github.com/urwid/urwid/releases/tag/${version}";
     description = "A full-featured console (xterm et al.) user interface library";
+    changelog = "https://github.com/urwid/urwid/releases/tag/${version}";
     downloadPage = "https://github.com/urwid/urwid";
     homepage = "https://urwid.org/";
     license = licenses.lgpl21Plus;