1{ lib
2, aiohttp
3, buildPythonPackage
4, click
5, fetchFromGitHub
6, importlib-metadata
7, jinja2
8, linkify-it-py
9, markdown-it-py
10, mdit-py-plugins
11, mkdocs-exclude
12, msgpack
13, poetry-core
14, pytest-aiohttp
15, pytestCheckHook
16, pythonOlder
17, rich
18, syrupy
19, time-machine
20, typing-extensions
21}:
22
23buildPythonPackage rec {
24 pname = "textual";
25 version = "0.37.1";
26 format = "pyproject";
27
28 disabled = pythonOlder "3.7";
29
30 src = fetchFromGitHub {
31 owner = "Textualize";
32 repo = pname;
33 rev = "refs/tags/v${version}";
34 hash = "sha256-4ehq36j2n2wRMgos5x4LQ0QeELpWAOgpgTxEWjqFLJs=";
35 };
36
37 nativeBuildInputs = [
38 poetry-core
39 ];
40
41 propagatedBuildInputs = [
42 aiohttp
43 click
44 importlib-metadata
45 linkify-it-py
46 markdown-it-py
47 mdit-py-plugins
48 mkdocs-exclude
49 msgpack
50 rich
51 ] ++ lib.optionals (pythonOlder "3.11") [
52 typing-extensions
53 ];
54
55 nativeCheckInputs = [
56 jinja2
57 pytest-aiohttp
58 pytestCheckHook
59 syrupy
60 time-machine
61 ];
62
63 disabledTestPaths = [
64 # snapshot tests require syrupy<4
65 "tests/snapshot_tests/test_snapshots.py"
66 ];
67
68 disabledTests = [
69 # Assertion issues
70 "test_textual_env_var"
71 "test_softbreak_split_links_rendered_correctly"
72 ];
73
74 pythonImportsCheck = [
75 "textual"
76 ];
77
78 __darwinAllowLocalNetworking = true;
79
80 meta = with lib; {
81 description = "TUI framework for Python inspired by modern web development";
82 homepage = "https://github.com/Textualize/textual";
83 changelog = "https://github.com/Textualize/textual/releases/tag/v${version}";
84 license = licenses.mit;
85 maintainers = with maintainers; [ joelkoen ];
86 };
87}