gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / emacs-source-date-epoch.patch
CommitLineData
6f4b23e6
AK
1Honor SOURCE_DATE_EPOCH variable to avoid non-determinism in generated
2"autoloads" files.
3
4--- a/lisp/emacs-lisp/autoload.el
5+++ b/lisp/emacs-lisp/autoload.el
36a09d18
MW
6@@ -419,8 +419,12 @@
7 ;; nil t))
8 ;; (match-end 2))))
6f4b23e6
AK
9 (insert generate-autoload-section-header)
10- (prin1 `(autoloads ,autoloads ,load-name ,file ,time)
11- outbuf)
12+ (let* ((env (getenv "SOURCE_DATE_EPOCH"))
13+ (time (if env
14+ (seconds-to-time (string-to-number env))
15+ time)))
16+ (prin1 `(autoloads ,autoloads ,load-name ,file ,time)
17+ outbuf))
18 (terpri outbuf)
19 ;; Break that line at spaces, to avoid very long lines.
20 ;; Make each sub-line into a comment.