1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pythonOlder,
6 pytestCheckHook,
7 beancount-black,
8 beancount-parser,
9 beanhub-forms,
10 beanhub-import,
11 click,
12 fastapi,
13 httpx,
14 jinja2,
15 poetry-core,
16 pydantic,
17 pydantic-core,
18 pydantic-settings,
19 pytz,
20 pyyaml,
21 rich,
22 starlette-wtf,
23 uvicorn,
24}:
25
26buildPythonPackage rec {
27 pname = "beanhub-cli";
28 version = "1.2.3";
29 pyproject = true;
30
31 disabled = pythonOlder "3.10";
32
33 src = fetchFromGitHub {
34 owner = "LaunchPlatform";
35 repo = "beanhub-cli";
36 rev = "refs/tags/${version}";
37 hash = "sha256-oHlI3hloquD86fHr3AgwW5SqKxUw2gphP76wi6mCy44=";
38 };
39
40 build-system = [ poetry-core ];
41
42 dependencies = [
43 beancount-black
44 beancount-parser
45 beanhub-forms
46 beanhub-import
47 click
48 fastapi
49 jinja2
50 pydantic
51 pydantic-core
52 pydantic-settings
53 pytz
54 pyyaml
55 rich
56 starlette-wtf
57 uvicorn
58 ];
59
60 nativeCheckInputs = [
61 pytestCheckHook
62 httpx
63 ];
64
65 pythonImportsCheck = [ "beanhub_cli" ];
66
67 meta = {
68 description = "Command line tools for BeanHub or Beancount users";
69 mainProgram = "bh";
70 homepage = "https://github.com/LaunchPlatform/beanhub-cli/";
71 changelog = "https://github.com/LaunchPlatform/beanhub-cli/releases/tag/${version}";
72 license = with lib.licenses; [ mit ];
73 maintainers = with lib.maintainers; [ fangpen ];
74 };
75}