From 1653b23564b7de02440820d07ed067318ebf13b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 3 Jul 2019 22:27:17 +0200 Subject: derivations: 'map-derivation' no longer calls 'read-derivation-from-file'. This is a followup to 5cf4b26d52bcea382d98fb4becce89be9ee37b55. * guix/derivations.scm (map-derivation)[rewritten-input]: Avoid call to 'read-derivation-from-file'. --- guix/derivations.scm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/guix/derivations.scm b/guix/derivations.scm index 9cacca572e..4e969cb1a0 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -948,16 +948,14 @@ recursively." ;; in the format used in 'derivation' calls. (mlambda (input loop) (match input - (($ (= derivation-file-name path) - (sub-drvs ...)) - (match (vhash-assoc path mapping) + (($ 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) -- cgit v1.2.3