depot/third_party/nixpkgs/pkgs/development/python-modules/rich/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

49 lines
1,019 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, CommonMark
, dataclasses
, poetry-core
, pygments
, typing-extensions
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "rich";
version = "12.4.4";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Textualize";
repo = pname;
rev = "v${version}";
sha256 = "sha256-DW6cKJ5bXZdHGzgbYzTS+ryjy71dU9Lcy+egMXL30F8=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
CommonMark
pygments
] ++ lib.optional (pythonOlder "3.7") [
dataclasses
] ++ lib.optional (pythonOlder "3.9") [
typing-extensions
];
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/Textualize/rich";
license = licenses.mit;
maintainers = with maintainers; [ ris ];
};
}