aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/emacs-exec-path.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-04-13 23:09:06 +0200
committerLudovic Courtès <ludo@gnu.org>2015-04-13 23:20:07 +0200
commit1bef37ee2e0a6ba9048eb8087651c8dbd2c6c796 (patch)
tree5cb17a1ad2839c2df19afd984c0213afdff80031 /gnu/packages/patches/emacs-exec-path.patch
parent8214b7fbea7773143401811a0a582d0eed44c0dd (diff)
downloadguix-1bef37ee2e0a6ba9048eb8087651c8dbd2c6c796.tar
guix-1bef37ee2e0a6ba9048eb8087651c8dbd2c6c796.tar.gz
gnu: emacs: Do not keep references to the entries of the build-time $PATH.
This reduces the number of references of the output from 54 to 31, removing references notably to gcc, expat, glib:bin, ld-wrapper-0, texinfo, pkg-config, make, gawk, binutils, etc. Reported by David Thompson. * gnu/packages/patches/emacs-exec-path.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/emacs.scm (emacs)[source]: Use it.
Diffstat (limited to 'gnu/packages/patches/emacs-exec-path.patch')
-rw-r--r--gnu/packages/patches/emacs-exec-path.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/packages/patches/emacs-exec-path.patch b/gnu/packages/patches/emacs-exec-path.patch
new file mode 100644
index 0000000000..884fa94a64
--- /dev/null
+++ b/gnu/packages/patches/emacs-exec-path.patch
@@ -0,0 +1,18 @@
+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.
+
+--- a/lisp/loadup.el
++++ b/lisp/loadup.el
+@@ -64,6 +64,11 @@
+ (expand-file-name "textmodes" dir)
+ (expand-file-name "vc" dir)))))
+
++;; Reset 'exec-path' so we don't capture the build-time $PATH in the
++;; 'emacs' executable.
++(setq-default exec-path nil)
++(setq exec-path nil)
++
+ (if (eq t purify-flag)
+ ;; Hash consing saved around 11% of pure space in my tests.
+ (setq purify-flag (make-hash-table :test 'equal :size 70000)))