aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-06 19:44:04 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-06 20:10:42 +0100
commit75290ee2db7452168c966fd9585c4e12f0c2e849 (patch)
treeb7957365a165da1fd272afc33e7f314b441bf44d /scripts
parentf61c1a11eddb8c14e90c1d3b5bd757712d45c25c (diff)
downloadbuild-coordinator-75290ee2db7452168c966fd9585c4e12f0c2e849.tar
build-coordinator-75290ee2db7452168c966fd9585c4e12f0c2e849.tar.gz
Implement storing derivations
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in
index ad6991b..286b464 100644
--- a/scripts/guix-build-coordinator.in
+++ b/scripts/guix-build-coordinator.in
@@ -22,9 +22,11 @@
;;; along with the guix-data-service. If not, see
;;; <http://www.gnu.org/licenses/>.
-(use-modules (srfi srfi-37)
+(use-modules (srfi srfi-1)
+ (srfi srfi-37)
(ice-9 match)
(guix-build-coordinator config)
+ (guix-build-coordinator datastore)
(guix-build-coordinator coordinator))
(define %options
@@ -40,6 +42,11 @@
(string-trim-right
(call-with-input-file arg get-string-all))
result)))
+ (option '("database") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'database
+ arg
+ result)))
(option '("update-database") #f #f
(lambda (opt name _ result)
(alist-cons 'update-database #t result)))
@@ -77,7 +84,12 @@
(("build" rest ...)
(let ((opts (parse-options rest)))
- (peek "BUILD" rest)))
+ (match (assq-ref opts 'arguments)
+ ((derivation-file)
+ (submit-build
+ (database-uri->datastore
+ (assq-ref opts 'database))
+ derivation-file)))))
((arguments ...)
(let ((opts (parse-options arguments)))