83405b6dd2
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
83 lines
1.5 KiB
Nix
83 lines
1.5 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, mkdocs-exclude
|
|
, markdown-it-py
|
|
, mdit-py-plugins
|
|
, linkify-it-py
|
|
, importlib-metadata
|
|
, rich
|
|
, typing-extensions
|
|
, aiohttp
|
|
, click
|
|
, jinja2
|
|
, msgpack
|
|
, pytest-aiohttp
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, syrupy
|
|
, time-machine
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "textual";
|
|
version = "0.12.1";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Textualize";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-7QyUARXvPgGzXvIdkh9/WO07I8wfMQF23xdrxPjO8e8=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace 'importlib-metadata = "^4.11.3"' 'importlib-metadata = "*"'
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
rich
|
|
markdown-it-py
|
|
mdit-py-plugins
|
|
linkify-it-py
|
|
importlib-metadata
|
|
aiohttp
|
|
click
|
|
msgpack
|
|
mkdocs-exclude
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
jinja2
|
|
pytest-aiohttp
|
|
pytestCheckHook
|
|
syrupy
|
|
time-machine
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# snapshot tests require syrupy<4
|
|
"tests/snapshot_tests/test_snapshots.py"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"textual"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "TUI framework for Python inspired by modern web development";
|
|
homepage = "https://github.com/Textualize/textual";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ joelkoen ];
|
|
};
|
|
}
|