about summary refs log tree commit diff
path: root/pkgs/misc/rich-cli/default.nix
blob: a76f921dcf9953c81761a991eefb01bbab6dcfd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ lib
, fetchFromGitHub
, fetchpatch
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "rich-cli";
  version = "1.8.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Textualize";
    repo = "rich-cli";
    rev = "refs/tags/v${version}";
    hash = "sha256-mV5b/J9wX9niiYtlmAUouaAm9mY2zTtDmex7FNWcezQ=";
  };

  patches = [
    # Update dependencies, https://github.com/Textualize/rich-cli/pull/94
    (fetchpatch {
      name = "update-dependencies.patch";
      url = "https://github.com/Textualize/rich-cli/pull/94/commits/1e9a11af7c1c78a5a44a207b1e0dce4c4b3c39f0.patch";
      hash = "sha256-cU+s/LK2GDVWXLZob0n5J6sLjflCr8w10hRLgeWN5Vg=";
    })
    (fetchpatch {
      name = "markdown.patch";
      url = "https://github.com/Textualize/rich-cli/pull/94/commits/0a8e77d724ace88ce88ee9d68a46b1dc8464fe0b.patch";
      hash = "sha256-KXvRG36Qj5kCj1RiAJsNkoJY7t41zUfJFgHeCtc0O4w=";
    })
  ];

  pythonRelaxDeps = [
    "textual"
  ];

  build-system = with python3.pkgs; [
    poetry-core
  ];

  nativeBuildInputs = with python3.pkgs; [
  ];

  dependencies = with python3.pkgs; [
    click
    requests
    rich
    rich-rst
    textual
  ];

  pythonImportsCheck = [
    "rich_cli"
  ];

  meta = with lib; {
    description = "Command Line Interface to Rich";
    homepage = "https://github.com/Textualize/rich-cli";
    changelog = "https://github.com/Textualize/rich-cli/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ joelkoen ];
    mainProgram = "rich";
  };
}