Subject: [bug#78252] [PATCH v1 3/5] gnu: Add beanquery.

From: Sergey Trofimov <[email-masked]>
Date: Thu, 8 May 2025 07:06:44 +0200

* gnu/packages/finance.scm (beanquery): New variable.

Change-Id: Ic733750b5b71740992a145b1ee05fa67dbe1f837
---
 gnu/packages/finance.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index bb6ca42af9..040854856e 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -2090,6 +2090,29 @@ (define-public beancount-3
 generate a variety of reports from them, and provides a web interface.")
     (license license:gpl2)))
 
+(define-public beanquery
+  (package
+    (name "beanquery")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "beanquery" version))
+       (sha256
+        (base32 "0b6dhj9lcf3b347rsjb0k25qgsmqf9jnd0yizv3kad00745bawid"))
+       (modules '((guix build utils)))
+       (snippet #~(substitute* "pyproject.toml"
+                    (("tatsu-lts")
+                     "tatsu")))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list beancount-3 python-click python-dateutil
+                             python-tatsu))
+    (native-inputs (list python-setuptools python-wheel python-pytest))
+    (home-page "https://github.com/beancount/beanquery")
+    (synopsis "Customizable lightweight SQL query tool")
+    (description "Customizable lightweight SQL query tool.")
+    (license license:gpl2)))
+
 (define-public fava
   (package
     (name "fava")
-- 
2.49.0