derivations: Micro-optimize `derivation-hash'.
* guix/derivations.scm (derivation-hash): Use a UTF-8-encoded string output port. This makes things deterministic, and slightly faster.
This commit is contained in:
parent
62751a5ddd
commit
0bd31a2188
|
@ -469,8 +469,9 @@ in SIZE bytes."
|
||||||
(drv (make-derivation outputs inputs sources
|
(drv (make-derivation outputs inputs sources
|
||||||
system builder args env-vars)))
|
system builder args env-vars)))
|
||||||
(sha256
|
(sha256
|
||||||
(string->utf8 (call-with-output-string
|
(with-fluids ((%default-port-encoding "UTF-8"))
|
||||||
(cut write-derivation drv <>))))))))))
|
(string->utf8 (call-with-output-string
|
||||||
|
(cut write-derivation drv <>)))))))))))
|
||||||
|
|
||||||
(define (store-path type hash name) ; makeStorePath
|
(define (store-path type hash name) ; makeStorePath
|
||||||
"Return the store path for NAME/HASH/TYPE."
|
"Return the store path for NAME/HASH/TYPE."
|
||||||
|
|
Loading…
Reference in New Issue