Files
nixpkgs/pkgs/development/python-modules/rich/default.nix

76 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
poetry-core,
# dependencies
markdown-it-py,
pygments,
# optional-dependencies
ipywidgets,
# tests
attrs,
pytestCheckHook,
which,
# for passthru.tests
enrich,
httpie,
rich-rst,
textual,
}:
buildPythonPackage rec {
pname = "rich";
version = "14.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Textualize";
repo = "rich";
tag = "v${version}";
hash = "sha256-44L3eVf/gI0FlOlxzJ7/+A1jN6ILkeVEelaru1Io20U=";
};
build-system = [ poetry-core ];
dependencies = [
markdown-it-py
pygments
];
optional-dependencies = {
jupyter = [ ipywidgets ];
};
nativeCheckInputs = [
attrs
pytestCheckHook
which
];
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 ];
};
}