summaryrefslogtreecommitdiff
path: root/guix/derivations.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-03 01:17:11 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-03 01:18:24 +0200
commitb0fad8a2d45a47138e202644c542adbd6d5ee684 (patch)
tree3416eaf7a3370f4ca8077a3fa706ce3dd8abd0d1 /guix/derivations.scm
parent69927e78de91b11d1fa93ffbf9a7cf915827b6e3 (diff)
downloadguix-patches-b0fad8a2d45a47138e202644c542adbd6d5ee684.tar
guix-patches-b0fad8a2d45a47138e202644c542adbd6d5ee684.tar.gz
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.
Diffstat (limited to 'guix/derivations.scm')
-rw-r--r--guix/derivations.scm4
1 files changed, 4 insertions, 0 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