summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/derivations.scm4
-rw-r--r--guix/scripts/download.scm2
-rw-r--r--guix/scripts/refresh.scm2
3 files changed, 6 insertions, 2 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index b7ab07c061..8ddef117d4 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -469,6 +469,10 @@ in SIZE bytes."
                            inputs))
               (drv    (make-derivation outputs inputs sources
                                        system builder args env-vars)))
+
+         ;; XXX: At this point this remains faster than `port-sha256', because
+         ;; the SHA256 port's `write' method gets called for every single
+         ;; character.
          (sha256
           (with-fluids ((%default-port-encoding "UTF-8"))
             (string->utf8 (call-with-output-string
diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm
index 3fbda034f5..87b420405c 100644
--- a/guix/scripts/download.scm
+++ b/guix/scripts/download.scm
@@ -116,7 +116,7 @@ Supported formats: 'nix-base32' (default), 'base32', and 'base16'
                       (or path
                           (leave (_ "~a: download failed~%")
                                  arg))
-                    (compose sha256 get-bytevector-all)))
+                    port-sha256))
            (fmt   (assq-ref opts 'format)))
       (format #t "~a~%~a~%" path (fmt hash))
       #t)))
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index aa74d6306b..c75ec4f091 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -137,7 +137,7 @@ values: 'interactive' (default), 'always', and 'never'."
                     (package-name package)
                     (package-version package) version)
             (let ((hash (call-with-input-file tarball
-                          (compose sha256 get-bytevector-all))))
+                          port-sha256)))
               (update-package-source package version hash)))
           (warning (_ "~a: version ~a could not be \
 downloaded and authenticated; not updating")