diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index f23dff89f042..f650bb2e9d5b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6481,6 +6481,15 @@ githubId = 225893; name = "James Cook"; }; + fangpen = { + email = "hello@fangpenlin.com"; + github = "fangpenlin"; + githubId = 201615; + name = "Fang-Pen Lin"; + keys = [{ + fingerprint = "7130 3454 A7CD 0F0A 941A F9A3 2A26 9964 AD29 2131"; + }]; + }; farcaller = { name = "Vladimir Pouzanov"; email = "farcaller@gmail.com"; 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 { };