Subject: [bug#78095] [PATCH 01/28] gnu: emacs-beancount: Enable tests.

From: Nicolas Graves <[email-masked]>
Date: Sun, 27 Apr 2025 16:52:35 +0200

* gnu/packages/finance.scm (emacs-beancount): Enable tests.
  [arguments]<test-command>: Set argument.
  <phases>: Add phase 'adjust-available-beancount-options.
---
 gnu/packages/finance.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 33dbefe2b9..32cb658099 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -2095,6 +2095,16 @@ (define-public emacs-beancount
          "01ivxgv1g0pkr0xi43366pghc3j3mmhk5bshis6kkn04bq04cx7f"))
        (file-name (git-file-name name version))))
     (build-system emacs-build-system)
+    (arguments
+     (list #:test-command #~(list "make" "test")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'adjust-available-beancount-options
+                 (lambda _
+                   (substitute* "beancount.el"
+                     (("\"account_unrealized_gains\"") "")))))))
+    (native-inputs
+     (list beancount))
     (home-page "https://github.com/beancount/beancount-mode")
     (synopsis "Emacs mode for Beancount")
     (description
-- 
2.49.0