mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
51 lines
1004 B
Nix
51 lines
1004 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, CommonMark
|
|
, colorama
|
|
, dataclasses
|
|
, poetry-core
|
|
, pygments
|
|
, typing-extensions
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "rich";
|
|
version = "10.4.0";
|
|
format = "pyproject";
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "willmcgugan";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0z01bvn8zx69simk26jv5ngvqv35fs7i0wbg1hjcd37lmv3v6261";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|