aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-03-14 09:25:45 +0000
committerChristopher Baines <mail@cbaines.net>2023-03-14 09:25:45 +0000
commite5e1c91059d9e205fdbb2d2cc871cc9cb24b3855 (patch)
tree3a6db49c7580e5637fde85ff6d21b21c3e88f899
parent5079aa2ffdebb39be035b6d94982cab20a950e0c (diff)
downloadbuild-coordinator-e5e1c91059d9e205fdbb2d2cc871cc9cb24b3855.tar
build-coordinator-e5e1c91059d9e205fdbb2d2cc871cc9cb24b3855.tar.gz
Fix passing around the derivation name in the publish hook
-rw-r--r--guix-build-coordinator/hooks.scm21
1 files changed, 11 insertions, 10 deletions
diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm
index 4845f6d..0f81f90 100644
--- a/guix-build-coordinator/hooks.scm
+++ b/guix-build-coordinator/hooks.scm
@@ -101,14 +101,14 @@
(define datastore
(build-coordinator-datastore build-coordinator))
- (define (process-referenced-derivation-source-files)
+ (define (process-referenced-derivation-source-files drv-name)
(with-store store
- (unless (valid-path? store derivation-name)
- (substitute-derivation derivation-name
+ (unless (valid-path? store drv-name)
+ (substitute-derivation drv-name
#:substitute-urls
derivation-substitute-urls))
- (let* ((drv (read-derivation-from-file derivation-name))
+ (let* ((drv (read-derivation-from-file drv-name))
(drv-sources
(derivation-sources drv))
(referenced-source-files
@@ -193,7 +193,7 @@
nar-filename)))))
referenced-source-files))))
- (define (process-output output)
+ (define (process-output drv-name output)
(lambda (output)
(let* ((output-name
(assq-ref output 'name))
@@ -232,8 +232,8 @@
`((lzip ,(stat:size (stat nar-location #f))))
#:system (datastore-find-derivation-system
datastore
- derivation-name)
- #:derivation derivation-name
+ drv-name)
+ #:derivation drv-name
#:public-key public-key
#:private-key private-key)
port)))
@@ -257,15 +257,16 @@
(let* ((build-details
(datastore-find-build datastore build-id))
- (derivation-name
+ (drv-name
(assq-ref build-details 'derivation-name))
(narinfos-and-nars
(append
(if publish-referenced-derivation-source-files?
- (process-referenced-derivation-source-files)
+ (process-referenced-derivation-source-files drv-name)
'())
(filter-map
- process-output
+ (lambda (output)
+ (process-output drv-name output))
(datastore-list-build-outputs datastore build-id)))))
(when combined-post-publish-hook
(with-exception-handler