about summary refs log tree commit diff
path: root/pkgs/development/python-modules/beanhub-cli/default.nix
blob: 25c003e192923c8742a68e27b1624fcd9e50a0ac (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{ lib
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, pytestCheckHook
, beancount-black
, beancount-parser
, beanhub-forms
, beanhub-import
, click
, fastapi
, httpx
, jinja2
, poetry-core
, pydantic
, pydantic-core
, pydantic-settings
, pytz
, pyyaml
, rich
, starlette-wtf
, uvicorn
}:

buildPythonPackage rec {
  pname = "beanhub-cli";
  version = "1.1.3";
  pyproject = true;

  disabled = pythonOlder "3.10";

  src = fetchFromGitHub {
    owner = "LaunchPlatform";
    repo = "beanhub-cli";
    rev = "refs/tags/${version}";
    hash = "sha256-vYBbaUVJAs+aIp6aQpJb62DEDxe/sQTzgOkjPq6ADoc=";
  };

  build-system = [
    poetry-core
  ];

  dependencies = [
    beancount-black
    beancount-parser
    beanhub-forms
    beanhub-import
    click
    fastapi
    jinja2
    pydantic
    pydantic-core
    pydantic-settings
    pytz
    pyyaml
    rich
    starlette-wtf
    uvicorn
  ];

  nativeCheckInputs = [
    pytestCheckHook
    httpx
  ];

  pythonImportsCheck = [
    "beanhub_cli"
  ];

  meta = {
    description = "Command line tools for BeanHub or Beancount users";
    mainProgram = "bh";
    homepage = "https://github.com/LaunchPlatform/beanhub-cli/";
    changelog = "https://github.com/LaunchPlatform/beanhub-cli/releases/tag/${version}";
    license = with lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ fangpen ];
  };
}