summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/plotille/default.nix
blob: 95be1cb0579eeb2b9a7a55c31c45ca7970acb3e6 (plain)
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
65
66
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  poetry-core,
  setuptools,
  mock,
  pendulum,
  pytestCheckHook,
  pytest-cov-stub,
  pytest-mock,
}:

buildPythonPackage rec {
  pname = "plotille";
  version = "5.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "tammoippen";
    repo = "plotille";
    tag = "v${version}";
    hash = "sha256-P2qwd935aaYgwLAKpTA2OAuohxVVzKwzYqjsuPSOSHs=";
  };

  patches = [
    # To remove when PR https://github.com/tammoippen/plotille/pull/63 has landed
    (fetchpatch {
      name = "add-build-information";
      url = "https://github.com/tammoippen/plotille/commit/db744e1fa9c141290966476ddf22a5e7d9a00c0a.patch";
      hash = "sha256-8vBVKrcH7R1d9ol3D7RLVtAzZbpMsB9rA1KHD7t3Ydc=";
    })
  ];

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail poetry.masonry.api poetry.core.masonry.api \
      --replace-fail "poetry>=" "poetry-core>="
  '';

  build-system = [
    poetry-core
    setuptools
  ];

  pythonImportsCheck = [
    "plotille"
  ];

  nativeCheckInputs = [
    mock
    pendulum
    pytestCheckHook
    pytest-cov-stub
    pytest-mock
  ];

  meta = {
    changelog = "https://github.com/tammoippen/plotille/releases/tag/v${version}";
    description = "Plot in the terminal using braille dots";
    homepage = "https://github.com/tammoippen/plotille";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}