2022-03-05 16:20:37 +00:00
|
|
|
{ lib
|
2023-08-22 20:05:09 +00:00
|
|
|
, aiohttp
|
2022-03-05 16:20:37 +00:00
|
|
|
, buildPythonPackage
|
2023-08-22 20:05:09 +00:00
|
|
|
, click
|
2022-03-05 16:20:37 +00:00
|
|
|
, fetchFromGitHub
|
2023-01-20 10:41:00 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, jinja2
|
2023-08-22 20:05:09 +00:00
|
|
|
, linkify-it-py
|
|
|
|
, markdown-it-py
|
|
|
|
, mdit-py-plugins
|
|
|
|
, mkdocs-exclude
|
2023-01-20 10:41:00 +00:00
|
|
|
, msgpack
|
2023-08-22 20:05:09 +00:00
|
|
|
, poetry-core
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytest-aiohttp
|
2022-03-05 16:20:37 +00:00
|
|
|
, pytestCheckHook
|
2022-05-18 14:49:53 +00:00
|
|
|
, pythonOlder
|
2023-08-22 20:05:09 +00:00
|
|
|
, rich
|
2023-01-20 10:41:00 +00:00
|
|
|
, syrupy
|
|
|
|
, time-machine
|
2023-08-22 20:05:09 +00:00
|
|
|
, typing-extensions
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "textual";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.33.0";
|
2022-03-05 16:20:37 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Textualize";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-IhqUUsS1kCG/AwnbcLAhmQYLBSqf1ff0pD2xH4Tgdho=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
aiohttp
|
|
|
|
click
|
2023-08-22 20:05:09 +00:00
|
|
|
importlib-metadata
|
|
|
|
linkify-it-py
|
|
|
|
markdown-it-py
|
|
|
|
mdit-py-plugins
|
2023-03-15 16:39:30 +00:00
|
|
|
mkdocs-exclude
|
2023-08-22 20:05:09 +00:00
|
|
|
msgpack
|
|
|
|
rich
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
2022-03-05 16:20:37 +00:00
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
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
|
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"
|
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +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
|
|
|
};
|
|
|
|
}
|