1{
2 lib,
3 stdenv,
4 backports-cached-property,
5 blessed,
6 buildPythonPackage,
7 cwcwidth,
8 fetchPypi,
9 pyte,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "curtsies";
17 version = "0.4.2";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-br4zIVvXyShRpQYEnHIMykz1wZLBZlwdepigTEcCdg4=";
25 };
26
27 nativeBuildInputs = [ setuptools ];
28
29 propagatedBuildInputs = [
30 blessed
31 cwcwidth
32 ] ++ lib.optionals (pythonOlder "3.8") [ backports-cached-property ];
33
34 nativeCheckInputs = [
35 pyte
36 pytestCheckHook
37 ];
38
39 meta = with lib; {
40 description = "Curses-like terminal wrapper, with colored strings!";
41 homepage = "https://github.com/bpython/curtsies";
42 changelog = "https://github.com/bpython/curtsies/blob/v${version}/CHANGELOG.md";
43 license = licenses.mit;
44 maintainers = with maintainers; [ flokli ];
45 broken = stdenv.isDarwin;
46 };
47}