aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/build-server
diff options
context:
space:
mode:
Diffstat (limited to 'guix-data-service/web/build-server')
-rw-r--r--guix-data-service/web/build-server/controller.scm32
1 files changed, 24 insertions, 8 deletions
diff --git a/guix-data-service/web/build-server/controller.scm b/guix-data-service/web/build-server/controller.scm
index a91a1b0..73b105f 100644
--- a/guix-data-service/web/build-server/controller.scm
+++ b/guix-data-service/web/build-server/controller.scm
@@ -120,14 +120,30 @@
(define (handle-derivation-events conn items)
(unless (null? items)
(let ((build-ids
- (insert-builds conn
- build-server-id
- (map (lambda (item)
- (assoc-ref item "derivation"))
- items)
- (map (lambda (item)
- (assoc-ref item "build_id"))
- items))))
+ (insert-builds
+ conn
+ build-server-id
+ (map (lambda (item)
+ (assoc-ref item "derivation"))
+ items)
+ (map (lambda (item)
+ (and=>
+ (assoc-ref item "derivation_outputs")
+ (lambda (outputs)
+ (map
+ (lambda (output)
+ `((path . ,(assoc-ref output "output"))
+ (hash_algorithm
+ . ,(or (assoc-ref output "hash_algorithm")
+ NULL))
+ (hash . ,(or (assoc-ref output "hash")
+ NULL))
+ (recursive . ,(assoc-ref output "recursive"))))
+ (vector->list outputs)))))
+ items)
+ (map (lambda (item)
+ (assoc-ref item "build_id"))
+ items))))
(insert-build-statuses
conn
build-ids