diff --git a/core/default.nix b/core/default.nix index 127727e..c092ec5 100644 --- a/core/default.nix +++ b/core/default.nix @@ -20,6 +20,8 @@ trace json + (callPackage ../planner {}) + libsodium # TODO(puck): don't propagate this ]; } diff --git a/core/src/magic.sld b/core/src/magic.sld index f1e3702..0f7544f 100644 --- a/core/src/magic.sld +++ b/core/src/magic.sld @@ -5,6 +5,7 @@ (import (scheme base) (scheme file) (zilch lib hash) (zilch nix daemon) (zilch nix drv) (zilch nix path) + (zilch planner step) (zilch zexpr) (srfi 128) (srfi 132) (srfi 146) (srfi 152) (chicken base) (chicken format) socket) @@ -250,6 +251,25 @@ (daemon-wop-build-paths (*daemon*) (list->vector to-build))) val) + (register-build-step '((zilch core magic) build) #t + (lambda items + (printf "received build info: ~S\n" items) + (define all-paths '()) + (for-each + (lambda (item) + (define outputs (list-ref item 1)) + (define drv-path (list-ref item 2)) + (set! all-paths (append (map (lambda (o) (string-append drv-path "!" o)) outputs) all-paths))) + items) + (daemon-wop-build-paths (*daemon*) (list->vector all-paths)) + (define output '()) + (for-each + (lambda (item) + (define output-map (daemon-wop-query-derivation-output-map (*daemon*) (list-ref item 2))) + (set! output (cons (cons (car item) output-map) output))) + items) + output)) + ;; Ensures the `` exists, then opens an input port to allow reading from it. (define (store-path-open path) (increment-counter 2)