Subject: [PATCH] Fix mu4e in mu 1.8.7.
From: Zhu Zihao <[email-masked]>
To: [email-masked]
Date: Fri, 5 Aug 2022 21:36:00 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

From 54da98d99779030dd4b74f6e4dfeb796b4f9cae4 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <[email-masked]>
Date: Sat, 6 Aug 2022 00:08:37 +0800
Subject: [PATCH 1/2] gnu: mu: Fix autoloads generation.

* gnu/packages/mail.scm (mu)[arguments]<#:phases>: In phase
'install-emacs-autoloads', fix the path to mu4e files to generate autoloads.
---
 gnu/packages/mail.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index ca4b3e819e..544e5cc247 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1203,7 +1203,7 @@ (define-public mu
              (emacs-generate-autoloads
               "mu4e"
               (string-append (assoc-ref outputs "out")
-                             "/share/emacs/site-lisp")))))))
+                             "/share/emacs/site-lisp/mu4e")))))))
     (home-page "https://www.djcbsoftware.nl/code/mu/")
     (synopsis "Quickly find emails")
     (description
-- 
2.37.1

From d3b7c19aa63d1585cb0a063fa1757d8974c1756d Mon Sep 17 00:00:00 2001
From: Zhu Zihao <[email-masked]>
Date: Sat, 6 Aug 2022 00:11:29 +0800
Subject: [PATCH 2/2] gnu: mu: Use G-expressions.

* gnu/packages/mail.scm (mu)[arguments]: Use G-expressions.
---
 gnu/packages/mail.scm | 41 +++++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 544e5cc247..6544a8dd7c 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1181,29 +1181,30 @@ (define-public mu
     (inputs
      (list glib gmime xapian))
     (arguments
-     `(#:modules ((guix build meson-build-system)
+     (list
+      #:modules '((guix build meson-build-system)
                   (guix build emacs-utils)
                   (guix build utils))
-       #:imported-modules (,@%meson-build-system-modules
+      #:imported-modules `(,@%meson-build-system-modules
                            (guix build emacs-utils))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-bin-references
-           (lambda _
-             (substitute* '("guile/tests/test-mu-guile.cc"
-                            "mu/tests/test-mu-cmd.cc"
-                            "mu/tests/test-mu-cmd-cfind.cc"
-                            "mu/tests/test-mu-query.cc")
-               (("/bin/sh") (which "sh")))
-             (substitute* '("lib/tests/bench-indexer.cc"
-                            "lib/utils/mu-utils.cc")
-               (("/bin/rm") (which "rm")))))
-         (add-after 'install 'install-emacs-autoloads
-           (lambda* (#:key outputs #:allow-other-keys)
-             (emacs-generate-autoloads
-              "mu4e"
-              (string-append (assoc-ref outputs "out")
-                             "/share/emacs/site-lisp/mu4e")))))))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-bin-references
+            (lambda _
+              (substitute* '("guile/tests/test-mu-guile.cc"
+                             "mu/tests/test-mu-cmd.cc"
+                             "mu/tests/test-mu-cmd-cfind.cc"
+                             "mu/tests/test-mu-query.cc")
+                (("/bin/sh") (which "sh")))
+              (substitute* '("lib/tests/bench-indexer.cc"
+                             "lib/utils/mu-utils.cc")
+                (("/bin/rm") (which "rm")))))
+          (add-after 'install 'install-emacs-autoloads
+            (lambda* (#:key outputs #:allow-other-keys)
+              (emacs-generate-autoloads
+               "mu4e"
+               (string-append (assoc-ref outputs "out")
+                              "/share/emacs/site-lisp/mu4e")))))))
     (home-page "https://www.djcbsoftware.nl/code/mu/")
     (synopsis "Quickly find emails")
     (description
-- 
2.37.1