From 805d70214a1b22da70a7545cb1eb49bb5d7484d8 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Tue, 7 Apr 2020 18:41:47 +0200
Subject: [PATCH] gnu: emacs-beancount: Move to (gnu packages finance).

This is a fixup for commit abcac7a52932bdf66c333659679b0a5e6169e34c, as
inheritance across modules is not safe.  Fixes <https://bugs.gnu.org/40488>.
Reported by Christopher Baines <mail@cbaines.net>.

* gnu/packages/emacs-xyz.scm (emacs-beancount): Move from here ...
* gnu/packages/finance.scm: ... to here.
---
 gnu/packages/emacs-xyz.scm | 21 +--------------------
 gnu/packages/finance.scm   | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a50c1492d75..f6b5406cd45 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016, 2017, 2018, 2019 Chris Marusich <cmmarusich@gmail.com>
-;;; Copyright © 2015, 2016, 2018, 2020 Christopher Lemmer Webber <cwebber@dustycloud.org>
+;;; Copyright © 2015, 2016, 2018 Christopher Lemmer Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2016 Adriano Peluso <catonano@gmail.com>
 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
@@ -107,7 +107,6 @@ (define-module (gnu packages emacs-xyz)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dictionaries)
   #:use-module (gnu packages emacs)
-  #:use-module (gnu packages finance)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages gnome)
@@ -22302,21 +22301,3 @@ (define-public emacs-haskell-snippets
       (description "Haskell-Snippets is a collection of YASnippet Haskell
 snippets for Emacs.")
       (license license:expat))))
-
-;; The beancount source ships with elisp in a subdirectory
-(define-public emacs-beancount
-  (package
-    (inherit beancount)
-    (name "emacs-beancount")
-    (build-system emacs-build-system)
-    (arguments
-     `(#:tests? #f ;no tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'chdir-emacs
-           (lambda _
-             (chdir "editors/emacs")
-             #t)))))
-    (synopsis "Emacs mode for beancount")
-    (description
-      "Emacs-beancount is an Emacs mode for the Beancount accounting tool.")))
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index e666860392b..b7cd9c0ae2e 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -40,6 +40,7 @@ (define-module (gnu packages finance)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system go)
@@ -1440,3 +1441,21 @@ (define-public beancount
 define financial transaction records in a text file, read them in memory,
 generate a variety of reports from them, and provides a web interface.")
     (license license:gpl2)))
+
+;; The beancount source ships with elisp in a subdirectory
+(define-public emacs-beancount
+  (package
+    (inherit beancount)
+    (name "emacs-beancount")
+    (build-system emacs-build-system)
+    (arguments
+     `(#:tests? #f ;no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'chdir-emacs
+           (lambda _
+             (chdir "editors/emacs")
+             #t)))))
+    (synopsis "Emacs mode for beancount")
+    (description
+      "Emacs-beancount is an Emacs mode for the Beancount accounting tool.")))
-- 
GitLab