summary refs log tree commit diff
path: root/gnu/ci.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-10-01 11:46:53 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-10-01 11:46:53 +0200
commit3ca014d1df35c50f50c6658166d1149ccd2f0e19 (patch)
tree48f3fc4e42901b089194a07a6224b22331117642 /gnu/ci.scm
parent5627bfe45ce46f498979b4ad2deab1fdfed22b6c (diff)
downloadguix-3ca014d1df35c50f50c6658166d1149ccd2f0e19.tar.gz
ci: Add nix-name and system keys.
Add 'nix-name and 'system properties to hydra objects. This way Cuirass won't
have to go through every derivation to add those properties.

* gnu/ci.scm (package->alist, image-jobs, system-test-jobs, tarball-jobs): Add
'nix-name and 'system properties.
* build-aux/hydra/guix-modular.scm (build-job): Ditto.
Diffstat (limited to 'gnu/ci.scm')
-rw-r--r--gnu/ci.scm52
1 files changed, 30 insertions, 22 deletions
diff --git a/gnu/ci.scm b/gnu/ci.scm
index 2329a38b84..c985cd653b 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -75,28 +75,30 @@
                          #:optional (package-derivation package-derivation))
   "Convert PACKAGE to an alist suitable for Hydra."
   (parameterize ((%graft? #f))
-    `((derivation . ,(derivation-file-name
-                      (package-derivation store package system
-                                          #:graft? #f)))
-      (description . ,(package-synopsis package))
-      (long-description . ,(package-description package))
-
-      ;; XXX: Hydra ignores licenses that are not a <license> structure or a
-      ;; list thereof.
-      (license . ,(let loop ((license (package-license package)))
-                    (match license
-                      ((? license?)
-                       (license-name license))
-                      ((lst ...)
-                       (map loop license)))))
-
-      (home-page . ,(package-home-page package))
-      (maintainers . ("bug-guix@gnu.org"))
-      (max-silent-time . ,(or (assoc-ref (package-properties package)
-                                         'max-silent-time)
-                              3600))              ;1 hour by default
-      (timeout . ,(or (assoc-ref (package-properties package) 'timeout)
-                      72000)))))                  ;20 hours by default
+    (let ((drv (package-derivation store package system
+                                   #:graft? #f)))
+      `((derivation . ,(derivation-file-name drv))
+        (nix-name . ,(derivation-name drv))
+        (system . ,(derivation-system drv))
+        (description . ,(package-synopsis package))
+        (long-description . ,(package-description package))
+
+        ;; XXX: Hydra ignores licenses that are not a <license> structure or a
+        ;; list thereof.
+        (license . ,(let loop ((license (package-license package)))
+                      (match license
+                        ((? license?)
+                         (license-name license))
+                        ((lst ...)
+                         (map loop license)))))
+
+        (home-page . ,(package-home-page package))
+        (maintainers . ("bug-guix@gnu.org"))
+        (max-silent-time . ,(or (assoc-ref (package-properties package)
+                                           'max-silent-time)
+                                3600))              ;1 hour by default
+        (timeout . ,(or (assoc-ref (package-properties package) 'timeout)
+                        72000))))))                  ;20 hours by default
 
 (define (package-job store job-name package system)
   "Return a job called JOB-NAME that builds PACKAGE on SYSTEM."
@@ -201,6 +203,8 @@ SYSTEM."
   "Return a list of jobs that build images for SYSTEM."
   (define (->alist drv)
     `((derivation . ,(derivation-file-name drv))
+      (nix-name . ,(derivation-name drv))
+      (system . ,(derivation-system drv))
       (description . "Stand-alone image of the GNU system")
       (long-description . "This is a demo stand-alone image of the GNU
 system.")
@@ -304,6 +308,8 @@ system.")
             (system-test-value test))))
 
       `((derivation . ,(derivation-file-name drv))
+        (nix-name . ,(derivation-name drv))
+        (system . ,(derivation-system drv))
         (description . ,(format #f "Guix '~a' system test"
                                 (system-test-name test)))
         (long-description . ,(system-test-description test))
@@ -333,6 +339,8 @@ system.")
   "Return Hydra jobs to build the self-contained Guix binary tarball."
   (define (->alist drv)
     `((derivation . ,(derivation-file-name drv))
+      (nix-name . ,(derivation-name drv))
+      (system . ,(derivation-system drv))
       (description . "Stand-alone binary Guix tarball")
       (long-description . "This is a tarball containing binaries of Guix and
 all its dependencies, and ready to be installed on \"foreign\" distributions.")