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

53 lines
1.0 KiB
Nix
Raw Normal View History

{ lib
2020-10-10 11:13:12 -07:00
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, CommonMark
, colorama
, dataclasses
, ipywidgets
2021-05-05 12:24:30 -07:00
, poetry-core
2020-10-10 11:13:12 -07:00
, pygments
, typing-extensions
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "rich";
2021-05-05 12:24:30 -07:00
version = "10.1.0";
format = "pyproject";
disabled = pythonOlder "3.6";
2020-10-10 11:13:12 -07:00
src = fetchFromGitHub {
owner = "willmcgugan";
repo = pname;
rev = "v${version}";
2021-05-05 12:24:30 -07:00
sha256 = "sha256-HH+k9uiK34yoqu83rknCIe2DpoqJRHkcqABuj8zjzqs=";
2020-10-10 11:13:12 -07:00
};
2021-05-05 12:24:30 -07:00
nativeBuildInputs = [ poetry-core ];
2020-10-10 11:13:12 -07:00
propagatedBuildInputs = [
CommonMark
colorama
ipywidgets
pygments
typing-extensions
2021-05-05 12:24:30 -07:00
] ++ lib.optional (pythonOlder "3.7") [
dataclasses
];
checkInputs = [
pytestCheckHook
];
2020-10-10 11:13:12 -07:00
pythonImportsCheck = [ "rich" ];
meta = with lib; {
2020-10-10 11:13:12 -07: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 ];
};
}