guix_mirror_bot pushed a commit to branch emacs-team
in repository guix.
commit d9afdd32d3a914d4b3c6f6c67f14be6c984fd006
Author: Morgan Smith <[email protected]>
AuthorDate: Mon Jun 8 21:23:40 2026 -0400
gnu: Emacs: Use a simpler method to reduce closure size.
Before and after this change, the closure size of emacs-minimal is 284.0
MiB.
Removing the patches without adjusting RUN_TEMACS raises the closure size
to 830.1 MiB.
* gnu/packages/patches/emacs-exec-path.patch: Delete file
* gnu/packages/patches/emacs-next-exec-path.patch: Delete file
* gnu/local.mk (dist_patch_DATA): Unregister patches.
* gnu/packages/emacs.scm (emacs-minimal):
[source]: Don't use the patch.
[arguments]<#:make-flags>: Use "env -i" to clean the environment.
(emacs-next-minimal): Adjust accordingly.
Signed-off-by: Liliana Marie Prikler <[email protected]>
---
gnu/local.mk | 2 --
gnu/packages/emacs.scm | 6 +++---
gnu/packages/patches/emacs-exec-path.patch | 18 ------------------
gnu/packages/patches/emacs-next-exec-path.patch | 18 ------------------
4 files changed, 3 insertions(+), 41 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 26818b8679..2174ad7712 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1251,7 +1251,6 @@ dist_patch_DATA =
\
%D%/packages/patches/emacs-disable-jit-compilation.patch
\
%D%/packages/patches/emacs-doc-toc-shell-commands.patch \
%D%/packages/patches/emacs-elisp-autofmt-fix-region-send.patch \
- %D%/packages/patches/emacs-exec-path.patch \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
%D%/packages/patches/emacs-gnus-alias-reference-signature.patch \
%D%/packages/patches/emacs-helpful-fix-signature.patch \
@@ -1264,7 +1263,6 @@ dist_patch_DATA =
\
%D%/packages/patches/emacs-native-comp-fix-filenames.patch \
%D%/packages/patches/emacs-native-comp-pin-packages.patch \
%D%/packages/patches/emacs-next-disable-jit-compilation.patch
\
- %D%/packages/patches/emacs-next-exec-path.patch \
%D%/packages/patches/emacs-next-native-comp-fix-filenames.patch \
%D%/packages/patches/emacs-pasp-mode-quote-file-names.patch \
%D%/packages/patches/emacs-polymode-fix-lexical-variable-error.patch \
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 6ffa9c23aa..6a620c0fc8 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -221,7 +221,6 @@
(base32
"1nggbgnns7lvxn68gzlcsgwh3bigvrbn45kh6dqia9yxlqc6zwxk"))
(patches (search-patches "emacs-disable-jit-compilation.patch"
- "emacs-exec-path.patch"
"emacs-fix-scheme-indent-function.patch"
"emacs-native-comp-driver-options.patch"
"emacs-native-comp-fix-filenames.patch"
@@ -249,7 +248,9 @@
(string-append "RUN_TEMACS= "
#$(this-package-native-input "libfaketime")
"/bin/faketime -m -f '" release-date "'"
- " ./temacs")))
+ ;; Reduce closure size by cleaning the
+ ;; environment of the emacs dumper
+ " env -i ./temacs")))
#:parallel-build? #f
#:phases
#~(modify-phases %standard-phases
@@ -732,7 +733,6 @@ editor (with wide ints)" )
(base32 "0d3pmrd0jzzkjh3ni2n142p5ry7qriwky5k0sdk2aq6hpdshgdj4"))
(patches
(search-patches "emacs-next-disable-jit-compilation.patch"
- "emacs-next-exec-path.patch"
"emacs-fix-scheme-indent-function.patch"
"emacs-native-comp-driver-options.patch"
"emacs-next-native-comp-fix-filenames.patch"
diff --git a/gnu/packages/patches/emacs-exec-path.patch
b/gnu/packages/patches/emacs-exec-path.patch
deleted file mode 100644
index 6e33e25258..0000000000
--- a/gnu/packages/patches/emacs-exec-path.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Do not capture the build-time value of $PATH in the 'emacs' executable
-since this can noticeably increase the size of the closure of Emacs
-with things like GCC being referenced.
-
-Index: emacs-next/lisp/loadup.el
-===================================================================
---- emacs-next.orig/lisp/loadup.el
-+++ emacs-next/lisp/loadup.el
-@@ -599,7 +599,8 @@ lost after dumping")))
- ((equal dump-mode "dump") "emacs")
- ((equal dump-mode "bootstrap") "emacs")
- ((equal dump-mode "pbootstrap")
"bootstrap-emacs.pdmp")
-- (t (error "Unrecognized dump mode %s" dump-mode)))))
-+ (t (error "Unrecognized dump mode %s" dump-mode))))
-+ (exec-path nil))
- (when (and (featurep 'native-compile)
- (equal dump-mode "pdump"))
- ;; Don't enable this before bootstrap is completed, as the
diff --git a/gnu/packages/patches/emacs-next-exec-path.patch
b/gnu/packages/patches/emacs-next-exec-path.patch
deleted file mode 100644
index 54091af262..0000000000
--- a/gnu/packages/patches/emacs-next-exec-path.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Do not capture the build-time value of $PATH in the 'emacs' executable
-since this can noticeably increase the size of the closure of Emacs
-with things like GCC being referenced.
-
-Index: emacs/lisp/loadup.el
-===================================================================
---- emacs.orig/lisp/loadup.el
-+++ emacs/lisp/loadup.el
-@@ -603,7 +603,8 @@ directory got moved. This is set to be
- (if (eq system-type 'ms-dos)
- "b-emacs.pdmp"
- "bootstrap-emacs.pdmp"))
-- (t (error "Unrecognized dump mode %s" dump-mode)))))
-+ (t (error "Unrecognized dump mode %s" dump-mode))))
-+ (exec-path nil))
- (when (and (featurep 'native-compile)
- (equal dump-mode "pdump"))
- ;; Don't enable this before bootstrap is completed, as the