diff options
author | kirillrdy <kirillrdy@gmail.com> | 2024-05-16 20:47:41 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 20:47:41 +1000 |
commit | 64199efed61b691e399c38c4ae0601e08b3ffa19 (patch) | |
tree | 0ee50f8bc8ab698c3388ffa25edc5532a2eca95b /pkgs | |
parent | 3eedfcec6b9474372ceca9356905649ffcd38c49 (diff) | |
parent | 34225aa06941e699157ec22d205ea2970b986874 (diff) |
Merge pull request #310655 from fangpenlin/add-beanhub-cli-and-deps
Add beanhub-cli and deps
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/beanhub-cli/default.nix | 78 | ||||
-rw-r--r-- | pkgs/development/python-modules/beanhub-extract/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/python-modules/beanhub-forms/default.nix | 55 | ||||
-rw-r--r-- | pkgs/development/python-modules/beanhub-import/default.nix | 59 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 8 |
6 files changed, 249 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/beanhub-cli/default.nix b/pkgs/development/python-modules/beanhub-cli/default.nix new file mode 100644 index 000000000000..25c003e19292 --- /dev/null +++ b/pkgs/development/python-modules/beanhub-cli/default.nix @@ -0,0 +1,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 ]; + }; +} diff --git a/pkgs/development/python-modules/beanhub-extract/default.nix b/pkgs/development/python-modules/beanhub-extract/default.nix new file mode 100644 index 000000000000..c0c623b88f30 --- /dev/null +++ b/pkgs/development/python-modules/beanhub-extract/default.nix @@ -0,0 +1,47 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pytestCheckHook +, poetry-core +, pytz +}: + +buildPythonPackage rec { + pname = "beanhub-extract"; + version = "0.0.7"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "LaunchPlatform"; + repo = "beanhub-extract"; + rev = "refs/tags/${version}"; + hash = "sha256-Wt8ZCyCaERNXEd0/Q89QWUW/wGFSHAP2RZLhnv5xkgY="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + pytz + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "beanhub_extract" + ]; + + meta = { + description = "The simple library for extracting all kind of bank account transaction export files, mostly for beanhub-import to ingest and generate transactions"; + homepage = "https://github.com/LaunchPlatform/beanhub-extract/"; + changelog = "https://github.com/LaunchPlatform/beanhub-extract/releases/tag/${version}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ fangpen ]; + }; +} diff --git a/pkgs/development/python-modules/beanhub-forms/default.nix b/pkgs/development/python-modules/beanhub-forms/default.nix new file mode 100644 index 000000000000..27cf644b96f0 --- /dev/null +++ b/pkgs/development/python-modules/beanhub-forms/default.nix @@ -0,0 +1,55 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pytestCheckHook +, jinja2 +, multidict +, poetry-core +, pydantic +, pyyaml +, wtforms +}: + +buildPythonPackage rec { + pname = "beanhub-forms"; + version = "0.1.3"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "LaunchPlatform"; + repo = "beanhub-forms"; + rev = "refs/tags/${version}"; + hash = "sha256-313c+ENmTe1LyfEiMXNB9AUoGx3Yv/1D0T3HnAbd+Zw="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + jinja2 + pydantic + pyyaml + wtforms + ]; + + nativeCheckInputs = [ + multidict + pytestCheckHook + ]; + + pythonImportsCheck = [ + "beanhub_forms" + ]; + + meta = { + description = "Library for generating and processing BeanHub's custom forms"; + homepage = "https://github.com/LaunchPlatform/beanhub-forms/"; + changelog = "https://github.com/LaunchPlatform/beanhub-forms/releases/tag/${version}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ fangpen ]; + }; +} diff --git a/pkgs/development/python-modules/beanhub-import/default.nix b/pkgs/development/python-modules/beanhub-import/default.nix new file mode 100644 index 000000000000..7097c45356a1 --- /dev/null +++ b/pkgs/development/python-modules/beanhub-import/default.nix @@ -0,0 +1,59 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pytestCheckHook +, beancount-black +, beancount-parser +, beanhub-extract +, jinja2 +, poetry-core +, pydantic +, pytz +, pyyaml +}: + +buildPythonPackage rec { + pname = "beanhub-import"; + version = "0.1.5"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "LaunchPlatform"; + repo = "beanhub-import"; + rev = "refs/tags/${version}"; + hash = "sha256-BH+d7cKC83b7T2Z1Xlwpsv3KACo1vDn6v65tElhir/c="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + beancount-black + beancount-parser + beanhub-extract + jinja2 + pydantic + pytz + pyyaml + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "beanhub_import" + ]; + + meta = { + description = "Declarative idempotent rule-based Beancount transaction import engine in Python"; + homepage = "https://github.com/LaunchPlatform/beanhub-import/"; + changelog = "https://github.com/LaunchPlatform/beanhub-import/releases/tag/${version}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ fangpen ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 77f0466f11b2..c0af455d8fef 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36214,6 +36214,8 @@ with pkgs; beancount-black = with python3.pkgs; toPythonApplication beancount-black; + beanhub-cli = with python3.pkgs; toPythonApplication beanhub-cli; + bean-add = callPackage ../applications/office/beancount/bean-add.nix { }; bench = haskell.lib.compose.justStaticExecutables haskellPackages.bench; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 95c3b3dc2564..f2d9f8726856 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1467,6 +1467,14 @@ self: super: with self; { beancount-docverif = callPackage ../development/python-modules/beancount-docverif { }; + beanhub-cli = callPackage ../development/python-modules/beanhub-cli { }; + + beanhub-extract = callPackage ../development/python-modules/beanhub-extract { }; + + beanhub-forms = callPackage ../development/python-modules/beanhub-forms { }; + + beanhub-import = callPackage ../development/python-modules/beanhub-import { }; + beanstalkc = callPackage ../development/python-modules/beanstalkc { }; beartype = callPackage ../development/python-modules/beartype { }; |