mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
build-system/gnu: Add 'reset-gzip-timestamps' phase.
* guix/build/gnu-build-system.scm (reset-gzip-timestamps): New procedure. (%standard-phases): Add it.
This commit is contained in:
parent
95e7be9728
commit
1d636d6319
1 changed files with 18 additions and 0 deletions
|
@ -482,6 +482,23 @@ (define (validate-output output)
|
||||||
(for-each validate-output directories)))
|
(for-each validate-output directories)))
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
|
(define* (reset-gzip-timestamps #:key outputs #:allow-other-keys)
|
||||||
|
"Reset embedded timestamps in gzip files found in OUTPUTS."
|
||||||
|
(define (process-directory directory)
|
||||||
|
(let ((files (find-files directory
|
||||||
|
(lambda (file stat)
|
||||||
|
(and (eq? 'regular (stat:type stat))
|
||||||
|
(or (string-suffix? ".gz" file)
|
||||||
|
(string-suffix? ".tgz" file))
|
||||||
|
(gzip-file? file)))
|
||||||
|
#:stat lstat)))
|
||||||
|
(for-each reset-gzip-timestamp files)))
|
||||||
|
|
||||||
|
(match outputs
|
||||||
|
(((names . directories) ...)
|
||||||
|
(for-each process-directory directories)))
|
||||||
|
#t)
|
||||||
|
|
||||||
(define* (compress-documentation #:key outputs
|
(define* (compress-documentation #:key outputs
|
||||||
(compress-documentation? #t)
|
(compress-documentation? #t)
|
||||||
(documentation-compressor "gzip")
|
(documentation-compressor "gzip")
|
||||||
|
@ -604,6 +621,7 @@ (define %standard-phases
|
||||||
validate-documentation-location
|
validate-documentation-location
|
||||||
delete-info-dir-file
|
delete-info-dir-file
|
||||||
patch-dot-desktop-files
|
patch-dot-desktop-files
|
||||||
|
reset-gzip-timestamps
|
||||||
compress-documentation)))
|
compress-documentation)))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue