diff options
author | Alex Kost <alezost@gmail.com> | 2015-10-21 15:59:23 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-11-14 21:59:37 +0300 |
commit | 6f4b23e674cefebf0ccefc301974e50db04ce5db (patch) | |
tree | 48bf12fdb25e09ed0841159bd5a1de756c7c41bb /gnu/packages/patches/emacs-source-date-epoch.patch | |
parent | f7dbeb376b42e95bc66dcf4cfa283e912f5e7aa4 (diff) | |
download | gnu-guix-6f4b23e674cefebf0ccefc301974e50db04ce5db.tar gnu-guix-6f4b23e674cefebf0ccefc301974e50db04ce5db.tar.gz |
gnu: emacs: Honor 'SOURCE_DATE_EPOCH'.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* gnu/packages/patches/emacs-source-date-epoch.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/emacs.scm (emacs)[source]: Use it.
Diffstat (limited to 'gnu/packages/patches/emacs-source-date-epoch.patch')
-rw-r--r-- | gnu/packages/patches/emacs-source-date-epoch.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/patches/emacs-source-date-epoch.patch b/gnu/packages/patches/emacs-source-date-epoch.patch new file mode 100644 index 0000000000..41c03ef514 --- /dev/null +++ b/gnu/packages/patches/emacs-source-date-epoch.patch @@ -0,0 +1,20 @@ +Honor SOURCE_DATE_EPOCH variable to avoid non-determinism in generated +"autoloads" files. + +--- a/lisp/emacs-lisp/autoload.el ++++ b/lisp/emacs-lisp/autoload.el +@@ -378,8 +378,12 @@ + "Insert the section-header line, + which lists the file name and which functions are in it, etc." + (insert generate-autoload-section-header) +- (prin1 `(autoloads ,autoloads ,load-name ,file ,time) +- outbuf) ++ (let* ((env (getenv "SOURCE_DATE_EPOCH")) ++ (time (if env ++ (seconds-to-time (string-to-number env)) ++ time))) ++ (prin1 `(autoloads ,autoloads ,load-name ,file ,time) ++ outbuf)) + (terpri outbuf) + ;; Break that line at spaces, to avoid very long lines. + ;; Make each sub-line into a comment. |