aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-04-22 01:09:45 +0200
committerLudovic Courtès <ludo@gnu.org>2017-04-22 01:25:22 +0200
commit1fe958d62ac33ef5e6da26ccc9213f4dae2ee1ae (patch)
tree7408f2c5da3733471fb598ce6f6b19d64cf17df1 /guix
parent6ef94ecbaa5112a1692b3c80423105b465f030a6 (diff)
downloadgnu-guix-1fe958d62ac33ef5e6da26ccc9213f4dae2ee1ae.tar
gnu-guix-1fe958d62ac33ef5e6da26ccc9213f4dae2ee1ae.tar.gz
download: Work around Guile 2.2 bug with 'time-monotonic' objects.
* guix/build/download.scm (time-monotonic) [guile-2.2]: New variable.
Diffstat (limited to 'guix')
-rw-r--r--guix/build/download.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm
index e3d5244590..6563341b9f 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -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))