biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / rich / default.nix
blobc9c29a1287be763d9037b9dea36fa6d0b3beb810
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,
23   # for passthru.tests
24   enrich,
25   httpie,
26   rich-rst,
27   textual,
30 buildPythonPackage rec {
31   pname = "rich";
32   version = "13.7.1";
33   format = "pyproject";
35   disabled = pythonOlder "3.7";
37   src = fetchFromGitHub {
38     owner = "Textualize";
39     repo = pname;
40     rev = "refs/tags/v${version}";
41     hash = "sha256-7LvmPrCpHfPEfJ1r8IFnQhYkBstvtIrWYhGwcchlc0s=";
42   };
44   nativeBuildInputs = [ poetry-core ];
46   propagatedBuildInputs = [
47     markdown-it-py
48     pygments
49   ] ++ lib.optionals (pythonOlder "3.9") [ typing-extensions ];
51   optional-dependencies = {
52     jupyter = [ ipywidgets ];
53   };
55   nativeCheckInputs = [
56     attrs
57     pytestCheckHook
58     setuptools
59   ];
61   disabledTests = [
62     # pygments 2.16 compat
63     # https://github.com/Textualize/rich/issues/3088
64     "test_card_render"
65     "test_markdown_render"
66     "test_markdown_render"
67     "test_python_render"
68     "test_python_render_simple"
69     "test_python_render_simple_passing_lexer_instance"
70     "test_python_render_indent_guides"
71     "test_option_no_wrap"
72     "test_syntax_highlight_ranges"
73   ];
75   pythonImportsCheck = [ "rich" ];
77   passthru.tests = {
78     inherit
79       enrich
80       httpie
81       rich-rst
82       textual
83       ;
84   };
86   meta = with lib; {
87     description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal";
88     homepage = "https://github.com/Textualize/rich";
89     changelog = "https://github.com/Textualize/rich/blob/v${version}/CHANGELOG.md";
90     license = licenses.mit;
91     maintainers = with maintainers; [ ris ];
92   };