guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: emacs: Do not keep references to the entries of the build-ti


From: Ludovic Courtès
Subject: 01/01: gnu: emacs: Do not keep references to the entries of the build-time $PATH.
Date: Mon, 13 Apr 2015 21:20:14 +0000

civodul pushed a commit to branch master
in repository guix.

commit 1bef37ee2e0a6ba9048eb8087651c8dbd2c6c796
Author: Ludovic Courtès <address@hidden>
Date:   Mon Apr 13 23:09:06 2015 +0200

    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.
---
 gnu-system.am                              |    1 +
 gnu/packages/emacs.scm                     |    3 ++-
 gnu/packages/patches/emacs-exec-path.patch |   18 ++++++++++++++++++
 3 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index ccc755b..f65f87a 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -407,6 +407,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/doxygen-tmake.patch                     \
   gnu/packages/patches/duplicity-piped-password.patch          \
   gnu/packages/patches/duplicity-test_selection-tmp.patch      \
+  gnu/packages/patches/emacs-exec-path.patch                   \
   gnu/packages/patches/eudev-rules-directory.patch             \
   gnu/packages/patches/findutils-absolute-paths.patch          \
   gnu/packages/patches/flashrom-use-libftdi1.patch             \
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index d680f2b..c7f9184 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -64,7 +64,8 @@
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))))
+               "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))
+             (patches (list (search-patch "emacs-exec-path.patch")))))
     (build-system glib-or-gtk-build-system)
     (arguments
      '(#:phases (alist-cons-before
diff --git a/gnu/packages/patches/emacs-exec-path.patch 
b/gnu/packages/patches/emacs-exec-path.patch
new file mode 100644
index 0000000..884fa94
--- /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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]