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

47 lines
1011 B
Nix
Raw Normal View History

{ lib
2020-10-10 18:13:12 +00:00
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, CommonMark
, colorama
, dataclasses
, ipywidgets
, poetry
, pygments
, typing-extensions
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "rich";
2021-03-24 17:41:55 +00:00
version = "9.13.0";
2020-10-10 18:13:12 +00:00
# tests not included in pypi tarball
src = fetchFromGitHub {
owner = "willmcgugan";
repo = pname;
rev = "v${version}";
2021-03-24 17:41:55 +00:00
sha256 = "0si3rzhg8wfxw4aakkp8sr6nbzfa54rl0w92macd1338q90ha4ly";
2020-10-10 18:13:12 +00:00
};
format = "pyproject";
nativeBuildInputs = [ poetry ];
propagatedBuildInputs = [
CommonMark
colorama
ipywidgets
pygments
typing-extensions
] ++ lib.optional (pythonOlder "3.7") dataclasses;
2020-10-10 18:13:12 +00:00
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "rich" ];
meta = with lib; {
2020-10-10 18:13:12 +00: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 ];
};
}