diff options
author | Christopher Baines <mail@cbaines.net> | 2020-04-06 19:44:04 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-04-06 20:10:42 +0100 |
commit | 75290ee2db7452168c966fd9585c4e12f0c2e849 (patch) | |
tree | b7957365a165da1fd272afc33e7f314b441bf44d /scripts | |
parent | f61c1a11eddb8c14e90c1d3b5bd757712d45c25c (diff) | |
download | build-coordinator-75290ee2db7452168c966fd9585c4e12f0c2e849.tar build-coordinator-75290ee2db7452168c966fd9585c4e12f0c2e849.tar.gz |
Implement storing derivations
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-build-coordinator.in | 16 |
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))) |