1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 poetry-core,
7 setuptools,
8 mock,
9 pendulum,
10 pytestCheckHook,
11 pytest-cov-stub,
12 pytest-mock,
13}:
14
15buildPythonPackage rec {
16 pname = "plotille";
17 version = "5.0.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "tammoippen";
22 repo = "plotille";
23 tag = "v${version}";
24 hash = "sha256-P2qwd935aaYgwLAKpTA2OAuohxVVzKwzYqjsuPSOSHs=";
25 };
26
27 patches = [
28 # To remove when PR https://github.com/tammoippen/plotille/pull/63 has landed
29 (fetchpatch {
30 name = "add-build-information";
31 url = "https://github.com/tammoippen/plotille/commit/db744e1fa9c141290966476ddf22a5e7d9a00c0a.patch";
32 hash = "sha256-8vBVKrcH7R1d9ol3D7RLVtAzZbpMsB9rA1KHD7t3Ydc=";
33 })
34 ];
35
36 postPatch = ''
37 substituteInPlace pyproject.toml \
38 --replace-fail poetry.masonry.api poetry.core.masonry.api \
39 --replace-fail "poetry>=" "poetry-core>="
40 '';
41
42 build-system = [
43 poetry-core
44 setuptools
45 ];
46
47 pythonImportsCheck = [
48 "plotille"
49 ];
50
51 nativeCheckInputs = [
52 mock
53 pendulum
54 pytestCheckHook
55 pytest-cov-stub
56 pytest-mock
57 ];
58
59 meta = {
60 changelog = "https://github.com/tammoippen/plotille/releases/tag/v${version}";
61 description = "Plot in the terminal using braille dots";
62 homepage = "https://github.com/tammoippen/plotille";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [ ];
65 };
66}