(zilch magic): fix non-CA store path building

This commit is contained in:
puck 2025-05-11 22:21:07 +00:00
parent 7e8e504f89
commit 8859253253

View file

@ -286,7 +286,15 @@
(define (store-path-realised path) (define (store-path-realised path)
(define ctx (zexp-unwrap (zexp (zexp-unquote path)))) (define ctx (zexp-unwrap (zexp (zexp-unquote path))))
(define val (zexp-evaluation-value ctx)) (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) (if (string? val)
(let-values (((resolved resolved-to-build) (resolve-upstream-output-placeholders val (zexp-evaluation-drvs ctx)))) (let-values (((resolved resolved-to-build) (resolve-upstream-output-placeholders val (zexp-evaluation-drvs ctx))))
(set! val resolved) (set! val resolved)