guix_mirror_bot pushed a commit to branch emacs-team
in repository guix.

commit 8ed47344be32685474fc551fb8675919b09274db
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Tue Aug 25 21:58:57 2026 +0200

    build-system: emacs: Use gnu:unpack on directories.
    
    * guix/build/emacs-build-system.scm (unpack): Use gnu:unpack if source is a
    directory.
    
    Reported-by: Sergey Trofimov <[email protected]>
    Fixes: guix/guix#5659
---
 guix/build/emacs-build-system.scm | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/guix/build/emacs-build-system.scm 
b/guix/build/emacs-build-system.scm
index 2d2d7524cd..60b9e65b4f 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -70,15 +70,17 @@ name that has been stripped of the hash and version number."
 (define* (unpack #:key source lisp-directory #:allow-other-keys)
   "Unpack SOURCE into the build directory.  SOURCE may be a compressed
 archive, a directory, or an Emacs Lisp file."
-  (if (string-suffix? ".el" source)
-      (begin
-        (mkdir "source")
-        (chdir "source")
-        (copy-file source (store-file->elisp-source-file source))
-        #t)
-      (begin
-        (gnu:unpack #:source source)
-        (and=> lisp-directory chdir))))
+  (cond
+   ((file-is-directory? source)
+    (gnu:unpack #:source source)
+    (and=> lisp-directory chdir))
+   ((string-suffix? ".el" source)
+    (mkdir "source")
+    (chdir "source")
+    (copy-file source (store-file->elisp-source-file source)))
+   (else
+    (gnu:unpack #:source source)
+    (and=> lisp-directory chdir))))
 
 (define* (expand-load-path #:key (prepend-source? #t) #:allow-other-keys)
   "Expand EMACSLOADPATH, so that inputs, whose code resides in subdirectories,

Reply via email to