portfolio: 0.71.2 -> 0.72.2 (#360387)
[NixPkgs.git] / pkgs / development / python-modules / rich / default.nix
blob34913e526d78a225d8611ac91ef769d62ae4e311
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
7   # build-system
8   poetry-core,
10   # dependencies
11   markdown-it-py,
12   pygments,
13   typing-extensions,
15   # optional-dependencies
16   ipywidgets,
18   # tests
19   attrs,
20   pytestCheckHook,
21   setuptools,
22   which,
24   # for passthru.tests
25   enrich,
26   httpie,
27   rich-rst,
28   textual,
31 buildPythonPackage rec {
32   pname = "rich";
33   version = "13.8.1";
34   format = "pyproject";
36   disabled = pythonOlder "3.7";
38   src = fetchFromGitHub {
39     owner = "Textualize";
40     repo = pname;
41     rev = "refs/tags/v${version}";
42     hash = "sha256-k+a64GDGzRDprvJz7s9Sm4z8jDV5TZ+CZLMgXKXXonM=";
43   };
45   nativeBuildInputs = [ poetry-core ];
47   propagatedBuildInputs = [
48     markdown-it-py
49     pygments
50   ] ++ lib.optionals (pythonOlder "3.9") [ typing-extensions ];
52   optional-dependencies = {
53     jupyter = [ ipywidgets ];
54   };
56   nativeCheckInputs = [
57     attrs
58     pytestCheckHook
59     setuptools
60     which
61   ];
63   disabledTests = [
64     # pygments 2.16 compat
65     # https://github.com/Textualize/rich/issues/3088
66     "test_card_render"
67     "test_markdown_render"
68     "test_markdown_render"
69     "test_python_render"
70     "test_python_render_simple"
71     "test_python_render_simple_passing_lexer_instance"
72     "test_python_render_indent_guides"
73     "test_option_no_wrap"
74     "test_syntax_highlight_ranges"
75   ];
77   pythonImportsCheck = [ "rich" ];
79   passthru.tests = {
80     inherit
81       enrich
82       httpie
83       rich-rst
84       textual
85       ;
86   };
88   meta = with lib; {
89     description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal";
90     homepage = "https://github.com/Textualize/rich";
91     changelog = "https://github.com/Textualize/rich/blob/v${version}/CHANGELOG.md";
92     license = licenses.mit;
93     maintainers = with maintainers; [ ris ];
94   };