about summary refs log tree commit diff
path: root/pkgs/development/python-modules/rich-pixels/default.nix
blob: f54d5bb66eb9acd511fb4ed20183e1c679548d8a (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  poetry-core,
  pytestCheckHook,
  syrupy,
  pillow,
  rich,
  pythonRelaxDepsHook,
}:

buildPythonPackage rec {
  pname = "rich-pixels";
  version = "2.2.0";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "darrenburns";
    repo = "rich-pixels";
    rev = version;
    hash = "sha256-fbpnHEfBPWLSYhgETqKbdmmzt7Lu/4oKgetjgNvv04c=";
  };

  patches = [
    (fetchpatch {
      name = "fix-version.patch";
      url = "https://github.com/darrenburns/rich-pixels/commit/ff1cc3fef789321831f29e9bf282ae6b337eddb2.patch";
      hash = "sha256-58ZHBNg1RCuOfuE034qF1SbAgoiWMNlSG3c5pCSLUyI=";
    })
  ];

  nativeBuildInputs = [
    poetry-core
    pythonRelaxDepsHook
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  checkInputs = [ syrupy ];

  propagatedBuildInputs = [
    pillow
    rich
  ];

  pythonRelaxDeps = [ "pillow" ];

  pythonImportsCheck = [ "rich_pixels" ];

  meta = with lib; {
    description = "Rich-compatible library for writing pixel images and ASCII art to the terminal";
    homepage = "https://github.com/darrenburns/rich-pixels";
    changelog = "https://github.com/darrenburns/rich-pixels/releases/tag/${src.rev}";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
  };
}