mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
Fix the order of the derivation's sources in `derivation-hash'.
* guix/derivations.scm (derivation-hash): Sort SOURCES alphabetically as well.
This commit is contained in:
parent
224f7ad6a3
commit
bcdd83ec69
1 changed files with 14 additions and 13 deletions
|
@ -240,19 +240,20 @@ (define derivation-hash ; `hashDerivationModulo' in derivations.cc
|
|||
;; derivation. Note: inputs are sorted as in the order of their hex
|
||||
;; hash representation because that's what the C++ `std::map' code
|
||||
;; does.
|
||||
(let* ((inputs (sort (map (match-lambda
|
||||
(($ <derivation-input> path sub-drvs)
|
||||
(let ((hash (call-with-input-file path
|
||||
(compose bytevector->base16-string
|
||||
derivation-hash
|
||||
read-derivation))))
|
||||
(make-derivation-input hash sub-drvs))))
|
||||
inputs)
|
||||
(lambda (i1 i2)
|
||||
(string<? (derivation-input-path i1)
|
||||
(derivation-input-path i2)))))
|
||||
(drv (make-derivation outputs inputs sources
|
||||
system builder args env-vars)))
|
||||
(let* ((inputs (sort (map (match-lambda
|
||||
(($ <derivation-input> path sub-drvs)
|
||||
(let ((hash (call-with-input-file path
|
||||
(compose bytevector->base16-string
|
||||
derivation-hash
|
||||
read-derivation))))
|
||||
(make-derivation-input hash sub-drvs))))
|
||||
inputs)
|
||||
(lambda (i1 i2)
|
||||
(string<? (derivation-input-path i1)
|
||||
(derivation-input-path i2)))))
|
||||
(sources (sort sources string<?))
|
||||
(drv (make-derivation outputs inputs sources
|
||||
system builder args env-vars)))
|
||||
(sha256
|
||||
(string->utf8 (call-with-output-string
|
||||
(cut write-derivation drv <>))))))))))
|
||||
|
|
Loading…
Reference in a new issue