derivations: 'map-derivation' no longer calls 'read-derivation-from-file'.

This is a followup to 5cf4b26d52.

* guix/derivations.scm (map-derivation)[rewritten-input]: Avoid call to
'read-derivation-from-file'.
This commit is contained in:
Ludovic Courtès 2019-07-03 22:27:17 +02:00
parent e6a57949f6
commit 1653b23564
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 5 deletions

View File

@ -948,16 +948,14 @@ recursively."
;; in the format used in 'derivation' calls.
(mlambda (input loop)
(match input
(($ <derivation-input> (= derivation-file-name path)
(sub-drvs ...))
(match (vhash-assoc path mapping)
(($ <derivation-input> drv (sub-drvs ...))
(match (vhash-assoc (derivation-file-name drv) mapping)
((_ . (? derivation? replacement))
(cons replacement sub-drvs))
((_ . replacement)
(list replacement))
(#f
(let* ((drv (loop (read-derivation-from-file path))))
(cons drv sub-drvs))))))))
(cons (loop drv) sub-drvs)))))))
(let loop ((drv drv))
(let* ((inputs (map (cut rewritten-input <> loop)