summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/derivations.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index cf329819c4..3c433a2685 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -469,8 +469,9 @@ in SIZE bytes."
               (drv    (make-derivation outputs inputs sources
                                        system builder args env-vars)))
          (sha256
-          (string->utf8 (call-with-output-string
-                         (cut write-derivation drv <>))))))))))
+          (with-fluids ((%default-port-encoding "UTF-8"))
+            (string->utf8 (call-with-output-string
+                           (cut write-derivation drv <>)))))))))))
 
 (define (store-path type hash name)               ; makeStorePath
   "Return the store path for NAME/HASH/TYPE."