nixpkgs-suyu/pkgs/development/python-modules/rich/default.nix
2021-08-08 23:36:51 +01: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.7.0";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "willmcgugan";
repo = pname;
rev = "v${version}";
sha256 = "1drh08cmcn8dqi0mpfwscz3ljsv2s60kyhxy6iiw5si7rf717j4p";
};
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 ];
};
}