depot/third_party/nixpkgs/pkgs/development/python-modules/rich/default.nix
Default email 3e7541c14f Project import generated by Copybara.
GitOrigin-RevId: ff377a78794d412a35245e05428c8f95fef3951f
2022-01-07 12:07:37 +08:00

50 lines
1,004 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, CommonMark
, colorama
, dataclasses
, poetry-core
, pygments
, typing-extensions
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "rich";
version = "10.16.1";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "willmcgugan";
repo = pname;
rev = "v${version}";
sha256 = "sha256-smeRZTMIDbK9pZRRj42BGj8ifQw9bTTE90rGaV/Up/4=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
CommonMark
colorama
pygments
typing-extensions
] ++ lib.optional (pythonOlder "3.7") [
dataclasses
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "rich" ];
meta = with lib; {
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 ];
};
}