2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
jinja2,
|
|
|
|
markdown-it-py,
|
|
|
|
poetry-core,
|
|
|
|
pytest-aiohttp,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
rich,
|
|
|
|
syrupy,
|
|
|
|
time-machine,
|
|
|
|
tree-sitter,
|
|
|
|
typing-extensions,
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "textual";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.68.0";
|
2023-10-19 13:55:26 +00:00
|
|
|
pyproject = true;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Textualize";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "textual";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-nxQVxe7lXMcxyqh4SWcQ/A6eQcEzkSshKmpweHpn7JE=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-08-22 20:05:09 +00:00
|
|
|
markdown-it-py
|
|
|
|
rich
|
2022-03-05 16:20:37 +00:00
|
|
|
typing-extensions
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ markdown-it-py.optional-dependencies.plugins ++ markdown-it-py.optional-dependencies.linkify;
|
2023-10-19 13:55:26 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
optional-dependencies = {
|
2023-10-19 13:55:26 +00:00
|
|
|
syntax = [
|
|
|
|
tree-sitter
|
|
|
|
# tree-sitter-languages
|
|
|
|
];
|
|
|
|
};
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
jinja2
|
|
|
|
pytest-aiohttp
|
2022-03-05 16:20:37 +00:00
|
|
|
pytestCheckHook
|
2023-01-20 10:41:00 +00:00
|
|
|
syrupy
|
|
|
|
time-machine
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ optional-dependencies.syntax;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# snapshot tests require syrupy<4
|
|
|
|
"tests/snapshot_tests/test_snapshots.py"
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Assertion issues
|
|
|
|
"test_textual_env_var"
|
|
|
|
"test_softbreak_split_links_rendered_correctly"
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
# requires tree-sitter-languages which is not packaged in nixpkgs
|
|
|
|
"test_register_language"
|
2024-04-21 15:54:59 +00:00
|
|
|
"test_language_binary_missing"
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "textual" ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "TUI framework for Python inspired by modern web development";
|
|
|
|
homepage = "https://github.com/Textualize/textual";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/Textualize/textual/releases/tag/v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
license = licenses.mit;
|
2023-01-20 10:41:00 +00:00
|
|
|
maintainers = with maintainers; [ joelkoen ];
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
}
|