at master 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 exceptiongroup, 5 fetchFromGitHub, 6 glibcLocales, 7 pygobject3, 8 pyserial, 9 pytestCheckHook, 10 pythonOlder, 11 pyzmq, 12 setuptools, 13 setuptools-scm, 14 tornado, 15 trio, 16 twisted, 17 typing-extensions, 18 wcwidth, 19}: 20 21buildPythonPackage rec { 22 pname = "urwid"; 23 version = "3.0.2"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.7"; 27 28 src = fetchFromGitHub { 29 owner = "urwid"; 30 repo = "urwid"; 31 tag = version; 32 hash = "sha256-pMGNybuJZeCzZRZr0/+N87/z+ZtLmSaWW47MWDirTjQ="; 33 }; 34 35 postPatch = '' 36 sed -i '/addopts =/d' pyproject.toml 37 ''; 38 39 build-system = [ 40 setuptools 41 setuptools-scm 42 ]; 43 44 dependencies = [ 45 typing-extensions 46 wcwidth 47 ]; 48 49 optional-dependencies = { 50 glib = [ pygobject3 ]; 51 tornado = [ tornado ]; 52 trio = [ 53 exceptiongroup 54 trio 55 ]; 56 twisted = [ twisted ]; 57 zmq = [ pyzmq ]; 58 serial = [ pyserial ]; 59 lcd = [ pyserial ]; 60 }; 61 62 nativeCheckInputs = [ 63 glibcLocales 64 pytestCheckHook 65 ] 66 ++ lib.flatten (builtins.attrValues optional-dependencies); 67 68 env.LC_ALL = "en_US.UTF8"; 69 70 enabledTestPaths = [ "tests" ]; 71 72 disabledTests = [ 73 # Flaky tests 74 "TwistedEventLoopTest" 75 ]; 76 77 disabledTestPaths = [ 78 # expect call hangs 79 "tests/test_vterm.py" 80 ]; 81 82 pythonImportsCheck = [ "urwid" ]; 83 84 meta = with lib; { 85 description = "Full-featured console (xterm et al.) user interface library"; 86 changelog = "https://github.com/urwid/urwid/releases/tag/${src.tag}"; 87 downloadPage = "https://github.com/urwid/urwid"; 88 homepage = "https://urwid.org/"; 89 license = licenses.lgpl21Plus; 90 maintainers = [ ]; 91 }; 92}