diff options
author | Christopher Baines <mail@cbaines.net> | 2020-02-16 09:54:27 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-02-16 09:54:27 +0000 |
commit | 9c7310f8e3d4a05c87e1068b927356fd2091247b (patch) | |
tree | de104ab29c9caf6972859ef4a302fe062a1e3248 /scripts | |
parent | 6f97cec96210b1e4d4852af2a799d2e0936c5dcb (diff) | |
download | data-service-9c7310f8e3d4a05c87e1068b927356fd2091247b.tar data-service-9c7310f8e3d4a05c87e1068b927356fd2091247b.tar.gz |
Make it possible to query builds servers for specific outputs
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-data-service-query-build-servers.in | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/guix-data-service-query-build-servers.in b/scripts/guix-data-service-query-build-servers.in index 8f96bed..8b87310 100644 --- a/scripts/guix-data-service-query-build-servers.in +++ b/scripts/guix-data-service-query-build-servers.in @@ -50,12 +50,15 @@ (lambda (opt name arg result) (error "unrecognized option" name)) (lambda (arg result) - (alist-cons - 'revision-commits - (cons arg - (or (assoc-ref result 'revision-commits) - '())) - (alist-delete 'revision-commits result))) + (let ((type (if (string-prefix? "/gnu/store/" arg) + 'outputs + 'revision-commits))) + (alist-cons + type + (cons arg + (or (assoc-ref result type) + '())) + (alist-delete type result)))) %default-options)) (let ((opts (parse-options (cdr (program-arguments))))) @@ -65,4 +68,5 @@ (query-build-servers conn (assq-ref opts 'build-server-ids) (assq-ref opts 'revision-commits) + (assq-ref opts 'outputs) #:verbose? (assq-ref opts 'verbose))))) |