summary refs log tree commit diff
path: root/pkgs/misc/rich-cli/default.nix
blob: 68996e4e457c423591bb56ed545a301ce707e766 (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
{ lib
, fetchFromGitHub
, python3
}:

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

  src = fetchFromGitHub {
    owner = "Textualize";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-mV5b/J9wX9niiYtlmAUouaAm9mY2zTtDmex7FNWcezQ=";
  };

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
  ];

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

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace 'rich = "^12.4.0"' 'rich = "*"'
  '';

  pythonImportsCheck = [
    "rich_cli"
  ];

  meta = with lib; {
    description = "Command Line Interface to Rich";
    homepage = "https://github.com/Textualize/rich-cli";
    license = licenses.mit;
    maintainers = with maintainers; [ jyooru ];
  };
}