Add custom emacs-notmuch package

This fixes a bug that exists in the package that the Notmuch logo doesn't show
up in notmuch-hello. I'll try and make a couple of other changes before opening
a pull request back to Guix to fix it.
This commit is contained in:
Tom Willemse 2023-09-29 14:35:02 -07:00
parent 314ef89dc0
commit fac6e98dbf
2 changed files with 41 additions and 5 deletions

View file

@ -53,7 +53,8 @@
#:select (local-file
mixed-text-file))
#:use-module ((guix packages)
#:select (package-name))
#:select (package-name
package-input-rewriting))
#:use-module ((guix transformations)
#:select (options->transformation))
#:use-module ((nongnu packages emacs)
@ -119,7 +120,8 @@
#:use-module ((oni packages count-emails)
#:select (count-emails))
#:use-module ((oni packages emacs)
#:select (emacs-inkplate))
#:select (emacs-inkplate
oni-emacs-notmuch))
#:use-module ((oni packages emacs-config)
#:select (emacs-oni-org-roam
emacs-oni-vterm
@ -195,6 +197,9 @@
`((with-branch . ,(string-append (package-name package) "=master"))))
package))
(define with-my-emacs-notmuch-package
(package-input-rewriting `((,emacs-notmuch . ,oni-emacs-notmuch))))
(define rincewind-picom-service
(service home-picom-service-type
(home-picom-configuration
@ -262,7 +267,6 @@
tmsu
mpd-random-albums
notmuch
emacs-notmuch
emacs-inkplate
emacs-outli
emacs-guix
@ -277,7 +281,7 @@
emacs-oni-common-lisp
emacs-oni-gui
emacs-oni-magit
emacs-oni-notmuch
(with-my-emacs-notmuch-package emacs-oni-notmuch)
emacs-oni-hy
emacs-oni-project
emacs-oni-bookmark

View file

@ -2,10 +2,14 @@
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module ((guix gexp)
#:select (gexp))
#:use-module (guix git-download)
#:use-module (guix build-system emacs)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages emacs-xyz))
#:use-module (gnu packages emacs-xyz)
#:use-module ((gnu packages mail)
#:select (notmuch)))
(define-public emacs-inkplate
(let ((commit "0897721a7b3d84aa3f200ae85fddd5fdd370fc42")
@ -412,3 +416,31 @@ new-theme for a while. I couldn't think of a name so I named it after him.")
(synopsis "Completion-At-Point Extension for YASnippet")
(description "A simple capf (Completion-At-Point Function) for completing yasnippet snippets.")
(license license:gpl3))))
(define-public oni-emacs-notmuch
(package
(inherit notmuch)
(name "oni-emacs-notmuch")
(build-system emacs-build-system)
(native-inputs '())
(inputs
(list notmuch))
(arguments
(list
#:exclude #~(cons* "make-deps.el" "rstdoc.el" %default-exclude)
#:include #~(cons* "notmuch-logo.svg" "notmuch-emacs-mua" %default-include)
#: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 (search-input-file inputs "/bin/notmuch")))
(substitute* "notmuch-lib.el"
(("\"notmuch\"")
(string-append "\"" notmuch "\"")))))))))
(synopsis "Run Notmuch within Emacs")
(description
"This package provides an Emacs-based interface to the Notmuch mail
system.")))