limo: 1.0.11 > 1.1 (#376325)
[NixPkgs.git] / pkgs / development / python-modules / textual / default.nix
blob0bcc0d1f5a089c8607d62b22f057c2e01901b10e
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   jinja2,
6   markdown-it-py,
7   platformdirs,
8   poetry-core,
9   pytest-aiohttp,
10   pytest-xdist,
11   pytestCheckHook,
12   pythonAtLeast,
13   pythonOlder,
14   rich,
15   syrupy,
16   time-machine,
17   tree-sitter,
18   tree-sitter-languages,
19   typing-extensions,
22 buildPythonPackage rec {
23   pname = "textual";
24   version = "1.0.0";
25   pyproject = true;
27   disabled = pythonOlder "3.8";
29   src = fetchFromGitHub {
30     owner = "Textualize";
31     repo = "textual";
32     tag = "v${version}";
33     hash = "sha256-3pNUDkkq9X3W9DdWp4M4h4ddHN+GzUxLCFNJJdAtRJM=";
34   };
36   build-system = [ poetry-core ];
38   dependencies =
39     [
40       platformdirs
41       markdown-it-py
42       rich
43       typing-extensions
44     ]
45     ++ markdown-it-py.optional-dependencies.plugins
46     ++ markdown-it-py.optional-dependencies.linkify;
48   optional-dependencies = {
49     syntax = [
50       tree-sitter
51     ] ++ lib.optionals (!tree-sitter-languages.meta.broken) [ tree-sitter-languages ];
52   };
54   nativeCheckInputs = [
55     jinja2
56     pytest-aiohttp
57     pytest-xdist
58     pytestCheckHook
59     syrupy
60     time-machine
61     tree-sitter
62   ];
64   disabledTestPaths = [
65     # Snapshot tests require syrupy<4
66     "tests/snapshot_tests/test_snapshots.py"
67   ];
69   disabledTests =
70     [
71       # Assertion issues
72       "test_textual_env_var"
74       # Requirements for tests are not quite ready
75       "test_register_language"
77       # Requires python bindings for tree-sitter languages
78       # https://github.com/Textualize/textual/issues/5449
79       "test_setting_unknown_language"
80       "test_update_highlight_query"
81     ]
82     ++ lib.optionals (pythonAtLeast "3.13") [
83       # https://github.com/Textualize/textual/issues/5327
84       "test_cursor_page_up"
85       "test_cursor_page_down"
86     ];
88   # Some tests in groups require state from previous tests
89   # See https://github.com/Textualize/textual/issues/4924#issuecomment-2304889067
90   pytestFlagsArray = [ "--dist=loadgroup" ];
92   pythonImportsCheck = [ "textual" ];
94   __darwinAllowLocalNetworking = true;
96   meta = with lib; {
97     description = "TUI framework for Python inspired by modern web development";
98     homepage = "https://github.com/Textualize/textual";
99     changelog = "https://github.com/Textualize/textual/releases/tag/v${version}";
100     license = licenses.mit;
101     maintainers = [ ];
102   };