diff --git a/guix/derivations.scm b/guix/derivations.scm index f12127f0ed9d583cd17622acc1f4bb93c9c8374b..d694ccf6d4d23646c333ce5fbafb2a6d212dd484 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -264,16 +264,16 @@ (define (dependencies drv) (derivation-prerequisites drv valid-input?))) (let* ((paths (delete-duplicates - (fold (lambda (drv result) - (let ((self (match (derivation->output-paths drv) - (((names . paths) ...) - paths)))) - (if (every valid? self) - result - (append (append self (dependencies drv)) - result)))) - '() - drv))) + (concatenate + (fold (lambda (drv result) + (let ((self (match (derivation->output-paths drv) + (((names . paths) ...) + paths)))) + (if (every valid? self) + result + (cons* self (dependencies drv) result)))) + '() + drv)))) (subst (list->set (substitutable-paths store paths)))) (cut set-contains? subst <>)))