nixpkgs/pkgs/development/python-modules/rich/default.nix

47 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-10-10 19:13:12 +01:00
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, CommonMark
, colorama
, dataclasses
, ipywidgets
, poetry
, pygments
, typing-extensions
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "rich";
2020-10-26 13:01:35 +00:00
version = "9.1.0";
2020-10-10 19:13:12 +01:00
# tests not included in pypi tarball
src = fetchFromGitHub {
owner = "willmcgugan";
repo = pname;
rev = "v${version}";
2020-10-26 13:01:35 +00:00
sha256 = "18iha0fs8vm0j11k39yxj26h8qxrp27ijhx6h1yyizbygmr5b5nk";
2020-10-10 19:13:12 +01:00
};
format = "pyproject";
nativeBuildInputs = [ poetry ];
propagatedBuildInputs = [
CommonMark
colorama
ipywidgets
pygments
typing-extensions
] ++ stdenv.lib.optional (pythonOlder "3.7") dataclasses;
checkInputs = [ pytestCheckHook ];
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 ];
};
}