aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-13 13:54:54 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-13 13:54:54 +0100
commit431dd196e1e613fe1aadc13588c4bf25ce0e2d0a (patch)
tree7bf9950b70dd9b46645b7d5e680fe7801e3a37d0
parent656225cfeee36a268a2b14604eafbace3835d78f (diff)
downloadbuild-coordinator-431dd196e1e613fe1aadc13588c4bf25ce0e2d0a.tar
build-coordinator-431dd196e1e613fe1aadc13588c4bf25ce0e2d0a.tar.gz
Add a coordinator function to find where an output is stored
Or should be stored.
-rw-r--r--guix-build-coordinator/coordinator.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index ad0a6a1..64a04c3 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -24,12 +24,15 @@
#:use-module (gcrypt random)
#:use-module (guix derivations)
#:use-module (guix-build-coordinator utils)
+ #:use-module (guix-build-coordinator config)
#:use-module (guix-build-coordinator datastore)
#:export (submit-build
new-agent
new-agent-password
fetch-builds
- agent-details))
+ agent-details
+
+ build-output-file-location))
(define* (submit-build datastore derivation-file
#:key
@@ -112,3 +115,10 @@
(allocated-builds (datastore-list-agent-builds datastore agent-id)))
`(,@agent ; description
(builds . ,(list->vector allocated-builds)))))
+
+(define (build-output-file-location datastore build-id output-name)
+ (let ((output (datastore-find-build-output datastore build-id output-name)))
+ (string-append (%config 'builds-dir) "/"
+ build-id "/outputs/" output-name "/"
+ (basename output)
+ ".nar.lz")))