diff --git a/core/src/magic.sld b/core/src/magic.sld index 0bb0fec..d2ceb7c 100644 --- a/core/src/magic.sld +++ b/core/src/magic.sld @@ -286,7 +286,15 @@ (define (store-path-realised path) (define ctx (zexp-unwrap (zexp (zexp-unquote path)))) (define val (zexp-evaluation-value ctx)) - (define to-build '()) + (define to-build (list)) + (for-each + (lambda (drv-and-outputs) + (unless (drv-is-ca (car drv-and-outputs)) + (for-each + (lambda (o) + (set! to-build (cons (string-append (derivation-path (car drv-and-outputs)) "!" o) to-build))) + (cdr drv-and-outputs)))) + (zexp-evaluation-drvs ctx)) (if (string? val) (let-values (((resolved resolved-to-build) (resolve-upstream-output-placeholders val (zexp-evaluation-drvs ctx)))) (set! val resolved)