mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
6f4b23e674
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.
20 lines
749 B
Diff
20 lines
749 B
Diff
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.
|