at 24.11-pre 1.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 jinja2, 6 markdown-it-py, 7 poetry-core, 8 pytest-aiohttp, 9 pytestCheckHook, 10 pythonOlder, 11 rich, 12 syrupy, 13 time-machine, 14 tree-sitter, 15 typing-extensions, 16}: 17 18buildPythonPackage rec { 19 pname = "textual"; 20 version = "0.53.1"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "Textualize"; 27 repo = "textual"; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-73qEogHe69B66r4EJOj2RAP95O5z7v/UYARTIEPxrcA="; 30 }; 31 32 build-system = [ poetry-core ]; 33 34 dependencies = [ 35 markdown-it-py 36 rich 37 typing-extensions 38 ] ++ markdown-it-py.optional-dependencies.plugins ++ markdown-it-py.optional-dependencies.linkify; 39 40 optional-dependencies = { 41 syntax = [ 42 tree-sitter 43 # tree-sitter-languages 44 ]; 45 }; 46 47 nativeCheckInputs = [ 48 jinja2 49 pytest-aiohttp 50 pytestCheckHook 51 syrupy 52 time-machine 53 ] ++ optional-dependencies.syntax; 54 55 disabledTestPaths = [ 56 # snapshot tests require syrupy<4 57 "tests/snapshot_tests/test_snapshots.py" 58 ]; 59 60 disabledTests = [ 61 # Assertion issues 62 "test_textual_env_var" 63 "test_softbreak_split_links_rendered_correctly" 64 65 # requires tree-sitter-languages which is not packaged in nixpkgs 66 "test_register_language" 67 "test_language_binary_missing" 68 ]; 69 70 pythonImportsCheck = [ "textual" ]; 71 72 __darwinAllowLocalNetworking = true; 73 74 meta = with lib; { 75 description = "TUI framework for Python inspired by modern web development"; 76 homepage = "https://github.com/Textualize/textual"; 77 changelog = "https://github.com/Textualize/textual/releases/tag/v${version}"; 78 license = licenses.mit; 79 maintainers = with maintainers; [ joelkoen ]; 80 }; 81}