2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-10-10 19:13:12 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, CommonMark
|
|
|
|
, colorama
|
|
|
|
, dataclasses
|
|
|
|
, ipywidgets
|
|
|
|
, poetry
|
|
|
|
, pygments
|
|
|
|
, typing-extensions
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rich";
|
2021-01-30 23:12:45 +00:00
|
|
|
version = "9.10.0";
|
2020-10-10 19:13:12 +01:00
|
|
|
|
|
|
|
# tests not included in pypi tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "willmcgugan";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-01-30 23:12:45 +00:00
|
|
|
sha256 = "1m1rswg16r4pxv7504nk7lpyxrwf16xw4w55rs3jisryx14ccic6";
|
2020-10-10 19:13:12 +01:00
|
|
|
};
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ poetry ];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
CommonMark
|
|
|
|
colorama
|
|
|
|
ipywidgets
|
|
|
|
pygments
|
|
|
|
typing-extensions
|
2021-01-24 00:29:22 +00:00
|
|
|
] ++ lib.optional (pythonOlder "3.7") dataclasses;
|
2020-10-10 19:13:12 +01:00
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "rich" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-10 19:13:12 +01:00
|
|
|
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal";
|
|
|
|
homepage = "https://github.com/willmcgugan/rich";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|