mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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
1 changed files with 3 additions and 2 deletions
|
@ -469,8 +469,9 @@ (define derivation-hash ; `hashDerivationModulo' in derivations.cc
|
||||||
(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 a new issue