unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Xinglu Chen <public@yoctocell.xyz>
To: 50077@debbugs.gnu.org
Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>, Andrew Tropin <andrew@trop.in>
Subject: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.
Date: Mon, 16 Aug 2021 16:12:19 +0200	[thread overview]
Message-ID: <dd24f426b72a1c590cbd71d2eaa66a75b559a9e7.1629122681.git.public@yoctocell.xyz> (raw)
In-Reply-To: <cover.1629122681.git.public@yoctocell.xyz>

* gnu/packages/mail.scm (notmuch)[outputs]: Add ‘emacs’ output
[arguments]<#:modules>: Add (guix build emacs-utils).
<#:phases>{configure}: Use the ‘emacs’ output.
{make-autoloads}: Modify the default ‘make-autoloads’ phase to use the ‘emacs’
output.
---
 gnu/packages/mail.scm | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index ccf44b7cf3..bbc616f6f5 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1337,7 +1337,8 @@ invoking @command{notifymuch} from the post-new hook.")
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   ((guix build emacs-build-system) #:prefix emacs:)
-                  (guix build utils))
+                  (guix build utils)
+                  (guix build emacs-utils))
        #:imported-modules (,@%gnu-build-system-modules
                            (guix build emacs-build-system)
                            (guix build emacs-utils))
@@ -1355,7 +1356,8 @@ invoking @command{notifymuch} from the post-new hook.")
                       (setenv "CONFIG_SHELL" (which "sh"))
 
                       (let* ((out (assoc-ref outputs "out"))
-                             (elisp (emacs:elpa-directory out)))
+                             (emacs (assoc-ref outputs "emacs"))
+                             (elisp (emacs:elpa-directory emacs)))
                         (invoke "./configure"
                                 (string-append "--prefix=" out)
                                 (string-append "--emacslispdir=" elisp)
@@ -1373,7 +1375,14 @@ invoking @command{notifymuch} from the post-new hook.")
                       (substitute* (find-files "test" "\\.sh$")
                         (("/bin/sh") (which "sh")))))
                   (add-after 'install 'make-autoloads
-                    (assoc-ref emacs:%standard-phases 'make-autoloads)))))
+                    (lambda* (#:key outputs inputs #:allow-other-keys)
+                      (let* ((emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs"))
+                             (out (assoc-ref outputs "emacs"))
+                             (elpa-name-ver ((@@ (guix build emacs-build-system)
+                                                 store-directory->elpa-name-version) out))
+                             (elpa-name (package-name->name+version elpa-name-ver))
+                             (el-dir (emacs:elpa-directory out)))
+                        (emacs-generate-autoloads elpa-name el-dir)))))))
     (native-inputs
      `(("bash-completion" ,bash-completion)
        ("emacs" ,emacs-no-x)    ; -minimal lacks libxml, needed for some tests
@@ -1394,6 +1403,7 @@ invoking @command{notifymuch} from the post-new hook.")
        ("talloc" ,talloc)
        ("xapian" ,xapian)
        ("zlib" ,zlib)))
+    (outputs '("out" "emacs"))
     (home-page "https://notmuchmail.org/")
     (synopsis "Thread-based email index, search, and tagging")
     (description
-- 
2.32.0







  reply	other threads:[~2021-08-16 14:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16 14:10 [bug#50077] [PATCH 0/3] Various improvements to Notmuch Xinglu Chen
2021-08-16 14:12 ` Xinglu Chen [this message]
     [not found]   ` <87o89owoi0.fsf@trop.in>
2021-08-28 10:34     ` [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output Xinglu Chen
2021-08-30  7:14       ` Andrew Tropin
2021-08-30 13:33         ` [bug#50077] Separate ‘emacs’ output vs separate ‘emacs-’ package (was Re: [bug#50077] [PATCH 1/3] gnu: notmuch: Add separate 'emacs' output.) Xinglu Chen
2021-09-01  9:50           ` Andrew Tropin
     [not found]             ` <874kb4lcvf.fsf@yoctocell.xyz>
     [not found]               ` <456243eca955ecc83b26663ed4e7e22d5170f03d.camel@student.tugraz.at>
     [not found]                 ` <87sfynq2xm.fsf@zancanaro.id.au>
2021-09-03 16:14                   ` Xinglu Chen
2021-08-16 14:12 ` [bug#50077] [PATCH 2/3] gnu: notmuch: Build Info manual Xinglu Chen
2021-08-16 14:12 ` [bug#50077] [PATCH 3/3] gnu: notmuch: Use 'cc-for-target' instead of hardcoding 'gcc' Xinglu Chen
2021-09-04  9:41 ` [bug#50077] [PATCH v2 0/3] Improvements to Notmuch Xinglu Chen
2021-09-04  9:41   ` [bug#50077] [PATCH v2 1/3] gnu: notmuch: Build Texinfo manual Xinglu Chen
2021-09-04  9:41   ` [bug#50077] [PATCH v2 2/3] gnu: notmuch: Make cross-compilable Xinglu Chen
2021-09-04  9:42   ` [bug#50077] [PATCH v2 3/3] gnu: Add emacs-notmuch Xinglu Chen
2021-09-14  7:22     ` Andrew Tropin
2021-09-14 15:29       ` Xinglu Chen
2021-09-14 15:35         ` zimoun
2021-09-14 19:20           ` Xinglu Chen
2021-09-14  7:05   ` bug#50077: [PATCH v2 0/3] Improvements to Notmuch Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd24f426b72a1c590cbd71d2eaa66a75b559a9e7.1629122681.git.public@yoctocell.xyz \
    --to=public@yoctocell.xyz \
    --cc=50077@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).