gnu: Add emacs-notmuch.

* gnu/packages/mail.scm (notmuch)[arguments]: Remove Emacs-related stuff.
* gnu/packages/emacs-xyz.scm (emacs-consult-notmuch)[propagated-inputs]: Add
‘emacs-notmuch’.
(emacs-counsel-notmuch)[propagated-inputs]: Use ‘emacs-notmuch’ instead of
‘notmuch’.
(emacs-helm-notmuch): Likewise.
(emacs-notmuch-maildir): Likewise.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
Xinglu Chen 2021-09-04 11:42:33 +02:00 committed by Nicolas Goaziou
parent dceb7b0c3c
commit d77da6d387
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
2 changed files with 37 additions and 23 deletions

View File

@ -8332,7 +8332,7 @@ list of candidates.")
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-consult" ,emacs-consult)
("notmuch" ,notmuch)))
("emacs-notmuch" ,emacs-notmuch)))
(home-page "https://codeberg.org/jao/consult-notmuch")
(synopsis "Search and preview Notmuch emails using Consult")
(description
@ -9518,6 +9518,8 @@ queries using counsel.")
`(("emacs-counsel" ,emacs-counsel)
("notmuch" ,notmuch)
("emacs-s" ,emacs-s)))
(propagated-inputs
`(("emacs-notmuch" ,emacs-notmuch)))
(home-page "https://github.com/fuxialexander/counsel-notmuch")
(synopsis "Search emails in Notmuch asynchronously with Ivy")
(description
@ -24012,7 +24014,7 @@ workspaces with a LSP-compliant server running.")
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-helm" ,emacs-helm)
("notmuch" ,notmuch)))
("emacs-notmuch" ,emacs-notmuch)))
(synopsis "Search emails with Emacs Notmuch and Helm")
(description
"This package can be used to search emails in Emacs, searching result
@ -24035,7 +24037,7 @@ real search.")
"0pmikf1djkr07067nkgmdcxyn7l7ibswx6qlnai8v1v51f9h1g9q"))))
(build-system emacs-build-system)
(propagated-inputs
`(("notmuch" ,notmuch)))
`(("emacs-notmuch" ,emacs-notmuch)))
(home-page "https://git.sr.ht/~tarsius/notmuch-maildir")
(synopsis "Visualize maildirs as a tree")
(description

View File

@ -167,6 +167,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system guile)
#:use-module (guix build-system emacs)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
@ -1362,31 +1363,18 @@ invoking @command{notifymuch} from the post-new hook.")
"1myylb19hj5nb1vriqng252vfjwwkgbi3gxj93pi2q1fzyw7w2lf"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
((guix build emacs-build-system) #:prefix emacs:)
(guix build utils))
#:imported-modules (,@%gnu-build-system-modules
(guix build emacs-build-system)
(guix build emacs-utils))
#:make-flags
`(#:make-flags
(list "V=1" ; verbose test output
"NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-notmuch-lib.el
(lambda _
(substitute* "emacs/notmuch-lib.el"
(("/bin/sh") (which "sh")))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(setenv "CC" ,(cc-for-target))
(setenv "CONFIG_SHELL" (which "sh"))
(let* ((out (assoc-ref outputs "out"))
(elisp (emacs:elpa-directory out)))
(let* ((out (assoc-ref outputs "out")))
(invoke "./configure"
(string-append "--prefix=" out)
(string-append "--emacslispdir=" elisp)
(string-append "--emacsetcdir=" elisp)))))
"--without-emacs"))))
(add-before 'check 'disable-failing-tests
;; FIXME: Investigate why these tests are failing,
;; and try removing this for notmuch versions > 0.31.
@ -1398,12 +1386,9 @@ invoking @command{notifymuch} from the post-new hook.")
(setenv "TEST_CC" ,(cc-for-target))
;; Patch various inline shell invocations.
(substitute* (find-files "test" "\\.sh$")
(("/bin/sh") (which "sh")))))
(add-after 'install 'make-autoloads
(assoc-ref emacs:%standard-phases 'make-autoloads)))))
(("/bin/sh") (which "sh"))))))))
(native-inputs
`(("bash-completion" ,bash-completion)
("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
("pkg-config" ,pkg-config)
("python" ,python)
("python-docutils" ,python-docutils)
@ -1411,6 +1396,7 @@ invoking @command{notifymuch} from the post-new hook.")
("texinfo" ,texinfo)
;; The following are required for tests only.
("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
("which" ,which)
("dtach" ,dtach)
("gnupg" ,gnupg)
@ -1429,6 +1415,32 @@ invoking @command{notifymuch} from the post-new hook.")
ing, and tagging large collections of email messages.")
(license license:gpl3+)))
(define-public emacs-notmuch
(package
(inherit notmuch)
(name "emacs-notmuch")
(build-system emacs-build-system)
(native-inputs '())
(inputs
`(("notmuch" ,notmuch)))
(arguments
`(#:exclude (cons* "make-deps.el" "rstdoc.el" %default-exclude)
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'chdir
(lambda _
(chdir "emacs")))
(add-after 'chdir 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((notmuch (assoc-ref inputs "notmuch")))
(substitute* "notmuch-lib.el"
(("\"notmuch\"")
(string-append "\"" notmuch "/bin/notmuch\"")))))))))
(synopsis "Run Notmuch within Emacs")
(description
"This package provides an Emacs-based interface to the Notmuch mail
system.")))
(define-public notmuch-addrlookup-c
(package
(name "notmuch-addrlookup-c")