about summary refs log tree commit diff
path: root/pkgs/development/python-modules/beanhub-import/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/beanhub-import/default.nix')
-rw-r--r--pkgs/development/python-modules/beanhub-import/default.nix54
1 files changed, 54 insertions, 0 deletions
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 0000000000000..4d205ebb54a6c
--- /dev/null
+++ b/pkgs/development/python-modules/beanhub-import/default.nix
@@ -0,0 +1,54 @@
+{
+  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 ];
+  };
+}