unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] http: Support fetching builds by derivation.
@ 2019-09-29 18:15 Christopher Baines via Development of GNU Guix and the GNU System distribution.
  2019-10-01  9:25 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Baines via Development of GNU Guix and the GNU System distribution. @ 2019-09-29 18:15 UTC (permalink / raw)
  To: guix-devel

There's a one to one mapping of build id to derivation, so allow querying by
derivation file name as well. I'm looking at this as I'm interested in getting
build information in to the Guix Data Service.

* src/cuirass/http.scm (url-handler): Add new clause to match statement, to
return build information by derivation file name.
---
 src/cuirass/http.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 2da3637..3f37716 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -248,6 +248,13 @@ Hydra format."
        (if hydra-build
            (respond-json (object->json-string hydra-build))
            (respond-build-not-found build-id))))
+    (("build" "gnu" "store" derivation-file-name)
+     (let* ((full-derivation-file-name
+             (string-append "/gnu/store/" derivation-file-name))
+            (hydra-build (handle-build-request full-derivation-file-name)))
+       (if hydra-build
+           (respond-json (object->json-string hydra-build))
+           (respond-build-not-found full-derivation-file-name))))
     (("build" build-id "details")
      (let ((build (db-get-build (string->number build-id))))
        (if build
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-17 20:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-29 18:15 [PATCH] http: Support fetching builds by derivation Christopher Baines via Development of GNU Guix and the GNU System distribution.
2019-10-01  9:25 ` Ludovic Courtès
2019-10-02  7:17   ` Christopher Baines via Development of GNU Guix and the GNU System distribution.
2019-10-02  7:26   ` Christopher Baines
2019-10-17 20:21     ` Christopher Baines

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).