Subject: [PATCH] gnu: emacs-minimal: Do not native-compile lisp/transient.el.

From: Simon Tournier <[email-masked]>
Date: Tue, 3 Sep 2024 16:57:48 +0200

Fixes <https://issues.guix.gnu.org/72333>.
Reported by daniel szmulewicz <[email-masked]>.

* gnu/packages/emacs.scm (emacs-minimal)[arguments]<phases>: Turn off
native-compilation for the file lisp/transient.el.

Change-Id: I27c9d660cbad46be66df641816e4596346969dfc
---
 gnu/packages/emacs.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f1ea4fe061..c555ca09f7 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -233,6 +233,16 @@ (define-public emacs-minimal
                 (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process)
                  (format #f "(or ~a (tramp-compat-process-running-p ~s))"
                          all (string-append "." process "-real"))))))
+          (add-after 'unpack 'do-not-native-compile
+            (lambda _
+              ;; Fixes <https://issues.guix.gnu.org/72333>.  Temporary
+              ;; workaround for native-compilation bug of transient.el.
+              ;; Please remove once the native-compilation for Emacs packages
+              ;; is fully supported.
+              (substitute* "lisp/transient.el"
+                ((";; End:")
+                 ";; no-native-compile: t
+;; End:"))))
           (add-before 'configure 'fix-/bin/pwd
             (lambda _
               ;; Use `pwd', not `/bin/pwd'.

base-commit: 1569b861f504178263b73b4b48563bf3937d01bf
-- 
2.41.0