From e5e1c91059d9e205fdbb2d2cc871cc9cb24b3855 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 14 Mar 2023 09:25:45 +0000 Subject: Fix passing around the derivation name in the publish hook --- guix-build-coordinator/hooks.scm | 21 +++++++++++---------- 1 file 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 -- cgit v1.2.3