From b0fad8a2d45a47138e202644c542adbd6d5ee684 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 3 Jul 2013 01:17:11 +0200 Subject: Use `port-sha256' and `open-sha256-port'. * guix/derivations.scm (derivation-hash): Add comment as to why we keep the plain `sha256' call. * guix/scripts/download.scm (guix-download): Use `port-sha256' instead of (compose sha256 get-bytevector-all). * guix/scripts/refresh.scm (update-package): Likewise. --- guix/derivations.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'guix/derivations.scm') 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 -- cgit v1.2.3