87f9c27ba9
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, markdown-it-py
|
|
, poetry-core
|
|
, pygments
|
|
, typing-extensions
|
|
, pytestCheckHook
|
|
|
|
# for passthru.tests
|
|
, enrich
|
|
, httpie
|
|
, rich-rst
|
|
, textual
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "rich";
|
|
version = "13.3.1";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Textualize";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-1soeb3aD4wB4stILvfOga/YZtyH6jd0XvnxkLmbW4G0=";
|
|
};
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
propagatedBuildInputs = [
|
|
markdown-it-py
|
|
pygments
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"rich"
|
|
];
|
|
|
|
passthru.tests = {
|
|
inherit enrich httpie rich-rst textual;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal";
|
|
homepage = "https://github.com/Textualize/rich";
|
|
changelog = "https://github.com/Textualize/rich/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ris joelkoen ];
|
|
};
|
|
}
|