Add custom ‘emacs-company’ package, remove custom ‘emacs-notmuch’

The custom ‘emacs-notmuch’ package isn't necessary anymore since my patch was
submitted[1]

The custom ‘emacs-company’ fixes some issues with icons and images not loading
while installed with Guix.

[1]: https://issues.guix.gnu.org/68667
This commit is contained in:
Tom Willemse 2024-01-30 13:24:02 -08:00
parent 5755831bb6
commit 0aa0b23962
2 changed files with 40 additions and 34 deletions

View file

@ -23,7 +23,8 @@
#:use-module ((gnu packages emacs-xyz) #:use-module ((gnu packages emacs-xyz)
#:select (emacs-org-roam #:select (emacs-org-roam
emacs-guix emacs-guix
emacs-org-contacts)) emacs-org-contacts
emacs-company))
#:use-module ((gnu packages file-systems) #:use-module ((gnu packages file-systems)
#:select (tmsu)) #:select (tmsu))
#:use-module ((gnu packages forth) #:use-module ((gnu packages forth)
@ -139,7 +140,7 @@
#:select (count-emails)) #:select (count-emails))
#:use-module ((oni packages emacs) #:use-module ((oni packages emacs)
#:select (emacs-inkplate #:select (emacs-inkplate
oni-emacs-notmuch oni-emacs-company
emacs-outli emacs-outli
emacs-syncthing-status)) emacs-syncthing-status))
#:use-module ((oni packages emacs-config) #:use-module ((oni packages emacs-config)
@ -214,8 +215,8 @@
`((with-branch . ,(string-append (package-name package) "=master")))) `((with-branch . ,(string-append (package-name package) "=master"))))
package)) package))
(define with-my-emacs-notmuch-package (define with-my-emacs-company-package
(package-input-rewriting `((,emacs-notmuch . ,oni-emacs-notmuch)))) (package-input-rewriting `((,emacs-company . ,oni-emacs-company))))
(define rincewind-picom-service (define rincewind-picom-service
(service home-picom-service-type (service home-picom-service-type
@ -268,15 +269,15 @@
emacs-guix emacs-guix
(emacs-oni-org-roam my-emacs) (emacs-oni-org-roam my-emacs)
emacs-oni-elisp (with-my-emacs-company-package emacs-oni-elisp)
emacs-oni-core emacs-oni-core
emacs-oni-elfeed emacs-oni-elfeed
emacs-oni-eshell (with-my-emacs-company-package emacs-oni-eshell)
emacs-oni-compilation emacs-oni-compilation
emacs-oni-common-lisp (with-my-emacs-company-package emacs-oni-common-lisp)
emacs-oni-gui emacs-oni-gui
emacs-oni-magit emacs-oni-magit
(with-my-emacs-notmuch-package emacs-oni-notmuch) emacs-oni-notmuch
emacs-oni-hy emacs-oni-hy
emacs-oni-project emacs-oni-project
emacs-oni-bookmark emacs-oni-bookmark
@ -284,12 +285,12 @@
emacs-oni-browse-url emacs-oni-browse-url
emacs-oni-c emacs-oni-c
emacs-oni-circe emacs-oni-circe
emacs-oni-clojure (with-my-emacs-company-package emacs-oni-clojure)
emacs-oni-cmake (with-my-emacs-company-package emacs-oni-cmake)
emacs-oni-conf emacs-oni-conf
emacs-oni-cpp (with-my-emacs-company-package emacs-oni-cpp)
emacs-oni-csharp (with-my-emacs-company-package emacs-oni-csharp)
emacs-oni-css (with-my-emacs-company-package emacs-oni-css)
emacs-oni-diff-hl emacs-oni-diff-hl
emacs-oni-ediff emacs-oni-ediff
emacs-oni-elm emacs-oni-elm
@ -309,7 +310,7 @@
emacs-oni-nxml emacs-oni-nxml
emacs-oni-package emacs-oni-package
emacs-oni-projectile emacs-oni-projectile
emacs-oni-scheme (with-my-emacs-company-package emacs-oni-scheme)
emacs-oni-sh emacs-oni-sh
emacs-oni-shr emacs-oni-shr
emacs-oni-tramp emacs-oni-tramp

View file

@ -417,33 +417,38 @@ new-theme for a while. I couldn't think of a name so I named it after him.")
(description "A simple capf (Completion-At-Point Function) for completing yasnippet snippets.") (description "A simple capf (Completion-At-Point Function) for completing yasnippet snippets.")
(license license:gpl3)))) (license license:gpl3))))
(define-public oni-emacs-notmuch (define-public oni-emacs-company
(package (package
(inherit notmuch) (name "oni-emacs-company")
(name "oni-emacs-notmuch") (version "0.10.2")
(source
(origin
(method url-fetch)
(uri (string-append "https://elpa.gnu.org/packages/"
"company-" version ".tar"))
(sha256
(base32 "0j2qrnx2w2al4f2n37b89q0pkabh5ccv00gsknvgaylhy0za5gq9"))))
(build-system emacs-build-system) (build-system emacs-build-system)
(native-inputs '())
(inputs
(list notmuch))
(arguments (arguments
(list (list
#:exclude #~(cons* "make-deps.el" "rstdoc.el" %default-exclude) #:include #~(cons* "icons/" %default-include)
#:include #~(cons* "notmuch-logo.svg" %default-include)
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'move-doc 'install-doc-images
(lambda _ (lambda* (#:key outputs #:allow-other-keys)
(chdir "emacs"))) (let ((images (find-files "./images/small/" ".*\\.png$")))
(add-after 'chdir 'patch-paths (for-each (lambda (image)
(lambda* (#:key inputs #:allow-other-keys) (install-file image
(let ((notmuch (search-input-file inputs "/bin/notmuch"))) (string-append #$output "/share/info/images/small")))
(substitute* "notmuch-lib.el" images)))))))
(("\"notmuch\"") (home-page "https://company-mode.github.io/")
(string-append "\"" notmuch "\""))))))))) (synopsis "Modular text completion framework")
(synopsis "Run Notmuch within Emacs")
(description (description
"This package provides an Emacs-based interface to the Notmuch mail "Company is a modular completion mechanism. Modules for retrieving
system."))) completion candidates are called back-ends, modules for displaying them are
front-ends. Company comes with many back-ends, e.g., @code{company-elisp}.
These are distributed in separate files and can be used individually.")
(license license:gpl3+)))
(define-public emacs-golden-ratio (define-public emacs-golden-ratio
(let ((commit "375c9f287dfad68829582c1e0a67d0c18119dab9") (let ((commit "375c9f287dfad68829582c1e0a67d0c18119dab9")