>From a54e9beb22d2d5102e48e26834b19bb2603f50b5 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer
Date: Thu, 5 Dec 2019 13:40:32 +0900 Subject: [PATCH 1/3] gnu: emacs: Byte compile the site-lisp directory. * gnu/packages/emacs.scm (emacs): Use the (gnu build emacs-utils) module. Byte compile the site-lisp directory as part of the 'install-site-start' phase. --- gnu/packages/emacs.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index eba7f88551..fcf966839b 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -119,6 +119,10 @@ `(#:tests? #f ; no check target #:configure-flags (list "--with-modules" "--disable-build-details") + #:modules ((guix build emacs-utils) + ,@%glib-or-gtk-build-system-modules) + #:imported-modules ((guix build emacs-utils) + ,@%glib-or-gtk-build-system-modules) #:phases (modify-phases %standard-phases (add-before 'configure 'fix-/bin/pwd @@ -135,7 +139,8 @@ ;; automatically found. (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (lisp-dir (string-append out "/share/emacs/site-lisp"))) + (lisp-dir (string-append out "/share/emacs/site-lisp")) + (emacs (string-append out "/bin/emacs"))) (copy-file (assoc-ref inputs "guix-emacs.el") (string-append lisp-dir "/guix-emacs.el")) (with-output-to-file (string-append lisp-dir "/site-start.el") @@ -148,6 +153,9 @@ ;; share/emacs/site-lisp union when added to EMACSLOADPATH, ;; which leads to conflicts. (delete-file (string-append lisp-dir "/subdirs.el")) + ;; Byte compile the site-start files. + (parameterize ((%emacs emacs)) + (emacs-byte-compile-directory lisp-dir)) #t)))))) (inputs `(("gnutls" ,gnutls) -- 2.23.0