1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 pyperclip, 11 textual, 12 13 # tests 14 pytestCheckHook, 15 pytest-asyncio, 16 tree-sitter-python, 17}: 18 19buildPythonPackage rec { 20 pname = "textual-textarea"; 21 version = "0.15.0"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "tconbeer"; 26 repo = "textual-textarea"; 27 tag = "v${version}"; 28 hash = "sha256-aaeXgD6RMQ3tlK5H/2lk3ueTyA3yYjHrYL51w/1tvSI="; 29 }; 30 31 patches = [ 32 # https://github.com/tconbeer/textual-textarea/issues/296 33 ./textual-2.0.0.diff 34 ]; 35 36 pythonRelaxDeps = [ 37 "textual" 38 ]; 39 40 build-system = [ poetry-core ]; 41 42 dependencies = [ 43 pyperclip 44 textual 45 ] ++ textual.optional-dependencies.syntax; 46 47 nativeCheckInputs = [ 48 pytestCheckHook 49 pytest-asyncio 50 tree-sitter-python 51 ]; 52 53 pythonImportsCheck = [ "textual_textarea" ]; 54 55 pytestFlagsArray = [ 56 # "--deselect=tests/functional_tests/test_comments.py::test_comments[sql--- ]" 57 ]; 58 59 disabledTests = [ 60 # Requires unpackaged tree-sitter-sql 61 # textual.widgets._text_area.LanguageDoesNotExist 62 "test_comments" 63 64 # AssertionError: assert Selection(sta...), end=(0, 6)) == Selection(sta...), end=(1, 0)) 65 # https://github.com/tconbeer/textual-textarea/issues/296 66 "test_keys" 67 ]; 68 69 meta = { 70 description = "Text area (multi-line input) with syntax highlighting for Textual"; 71 homepage = "https://github.com/tconbeer/textual-textarea"; 72 changelog = "https://github.com/tconbeer/textual-textarea/releases/tag/v${version}"; 73 license = lib.licenses.mit; 74 maintainers = with lib.maintainers; [ pcboy ]; 75 }; 76}