3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/rich/default.nix

51 lines
1,004 B
Nix
Raw Normal View History

{ lib
2020-10-10 19:13:12 +01:00
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, CommonMark
, colorama
, dataclasses
2021-05-05 20:24:30 +01:00
, poetry-core
2020-10-10 19:13:12 +01:00
, pygments
, typing-extensions
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "rich";
2021-08-30 23:17:10 +01:00
version = "10.9.0";
2021-05-05 20:24:30 +01:00
format = "pyproject";
disabled = pythonOlder "3.6";
2020-10-10 19:13:12 +01:00
src = fetchFromGitHub {
owner = "willmcgugan";
repo = pname;
rev = "v${version}";
2021-08-30 23:17:10 +01:00
sha256 = "0lf2s7n9b31aavwl5xjl3x1pjc756s8pbk0whh5kag80z5v6qc32";
2020-10-10 19:13:12 +01:00
};
2021-05-05 20:24:30 +01:00
nativeBuildInputs = [ poetry-core ];
2020-10-10 19:13:12 +01:00
propagatedBuildInputs = [
CommonMark
colorama
pygments
typing-extensions
2021-05-05 20:24:30 +01:00
] ++ lib.optional (pythonOlder "3.7") [
dataclasses
];
checkInputs = [
pytestCheckHook
];
2020-10-10 19:13:12 +01:00
pythonImportsCheck = [ "rich" ];
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 ];
};
}