download: Work around Guile 2.2 bug with 'time-monotonic' objects.

* guix/build/download.scm (time-monotonic) [guile-2.2]: New variable.
This commit is contained in:
Ludovic Courtès 2017-04-22 01:09:45 +02:00
parent 6ef94ecbaa
commit 1fe958d62a
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -140,6 +140,14 @@ Otherwise return STORE-PATH."
(string-drop base 32)))
store-path))
(cond-expand
(guile-2.2
;; Guile 2.2.0 to 2.2.2 included has a bug whereby 'time-monotonic' objects
;; have seconds and nanoseconds swapped (fixed in Guile commit 886ac3e).
;; Work around it.
(define time-monotonic time-tai))
(else #t))
(define* (progress-proc file size
#:optional (log-port (current-output-port))
#:key (abbreviation basename))