From 5b66067eb9fef083f06856e8145f471ad8d37c4e Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 10 Oct 2020 19:13:12 +0100 Subject: [PATCH] python3Packages.rich: init at 8.0.0 --- .../python-modules/rich/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/rich/default.nix diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix new file mode 100644 index 000000000000..71166b86f18e --- /dev/null +++ b/pkgs/development/python-modules/rich/default.nix @@ -0,0 +1,46 @@ +{ stdenv +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, CommonMark +, colorama +, dataclasses +, ipywidgets +, poetry +, pygments +, typing-extensions +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "rich"; + version = "8.0.0"; + + # tests not included in pypi tarball + src = fetchFromGitHub { + owner = "willmcgugan"; + repo = pname; + rev = "v${version}"; + sha256 = "0hv27b22x7dbx1i7nzsd8y8fymmvdak2hcx9242jwk4c1a7jr151"; + }; + format = "pyproject"; + + nativeBuildInputs = [ poetry ]; + propagatedBuildInputs = [ + CommonMark + colorama + ipywidgets + pygments + typing-extensions + ] ++ stdenv.lib.optional (pythonOlder "3.7") dataclasses; + + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "rich" ]; + + meta = with stdenv.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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 59b7c2be0935..43a1956d9eb3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6178,6 +6178,8 @@ in { rhpl = disabledIf isPy3k (callPackage ../development/python-modules/rhpl { }); + rich = callPackage ../development/python-modules/rich { }; + rig = callPackage ../development/python-modules/rig { }; ripser = callPackage ../development/python-modules/ripser { };