summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2026-08-25 21:58:57 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2026-08-28 16:58:33 +0200
commit554bf1ccd3cbd3ca55db9b58ddbae197585317d4 (patch)
tree32a7071bce401fc661286890f678d68bd17f28a2
parent57074b4336472a0a72b82aa1aacfafad56c3f74c (diff)
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 <sarg@sarg.org.ru> Fixes: guix/guix#5659
-rw-r--r--guix/build/emacs-build-system.scm20
1 files changed, 11 insertions, 9 deletions
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 2d2d7524cd4..60b9e65b4f5 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."
70(define* (unpack #:key source lisp-directory #:allow-other-keys) 70(define* (unpack #:key source lisp-directory #:allow-other-keys)
71 "Unpack SOURCE into the build directory. SOURCE may be a compressed 71 "Unpack SOURCE into the build directory. SOURCE may be a compressed
72archive, a directory, or an Emacs Lisp file." 72archive, a directory, or an Emacs Lisp file."
73 (if (string-suffix? ".el" source) 73 (cond
74 (begin 74 ((file-is-directory? source)
75 (mkdir "source") 75 (gnu:unpack #:source source)
76 (chdir "source") 76 (and=> lisp-directory chdir))
77 (copy-file source (store-file->elisp-source-file source)) 77 ((string-suffix? ".el" source)
78 #t) 78 (mkdir "source")
79 (begin 79 (chdir "source")
80 (gnu:unpack #:source source) 80 (copy-file source (store-file->elisp-source-file source)))
81 (and=> lisp-directory chdir)))) 81 (else
82 (gnu:unpack #:source source)
83 (and=> lisp-directory chdir))))
82 84
83(define* (expand-load-path #:key (prepend-source? #t) #:allow-other-keys) 85(define* (expand-load-path #:key (prepend-source? #t) #:allow-other-keys)
84 "Expand EMACSLOADPATH, so that inputs, whose code resides in subdirectories, 86 "Expand EMACSLOADPATH, so that inputs, whose code resides in subdirectories,