guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: ci: Add nix-name and system keys.


From: guix-commits
Subject: branch master updated: ci: Add nix-name and system keys.
Date: Thu, 01 Oct 2020 05:51:28 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 3ca014d  ci: Add nix-name and system keys.
3ca014d is described below

commit 3ca014d1df35c50f50c6658166d1149ccd2f0e19
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Thu Oct 1 11:46:53 2020 +0200

    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.
---
 build-aux/hydra/guix-modular.scm | 24 ++++++++++---------
 gnu/ci.scm                       | 52 +++++++++++++++++++++++-----------------
 2 files changed, 43 insertions(+), 33 deletions(-)

diff --git a/build-aux/hydra/guix-modular.scm b/build-aux/hydra/guix-modular.scm
index 8e07e7c..c70e9d8 100644
--- a/build-aux/hydra/guix-modular.scm
+++ b/build-aux/hydra/guix-modular.scm
@@ -43,17 +43,19 @@ for SYSTEM.  Use VERSION as the version identifier."
     (define build
       (primitive-load (string-append source "/build-aux/build-self.scm")))
 
-    `((derivation . ,(derivation-file-name
-                      (run-with-store store
-                        (build source #:version version #:system system
-                               #:pull-version 1
-                               #:guile-version "2.2")))) ;the latest 2.2.x
-      (description . "Modular Guix")
-      (long-description
-       . "This is the modular Guix package as produced by 'guix pull'.")
-      (license . ,license:gpl3+)
-      (home-page . ,%guix-home-page-url)
-      (maintainers . (,%guix-bug-report-address)))))
+    (let ((drv (run-with-store store
+                 (build source #:version version #:system system
+                        #:pull-version 1
+                        #:guile-version "2.2"))))
+      `((derivation . ,(derivation-file-name drv)) ;the latest 2.2.x
+        (nix-name . ,(derivation-name drv))
+        (system . ,(derivation-system drv))
+        (description . "Modular Guix")
+        (long-description
+         . "This is the modular Guix package as produced by 'guix pull'.")
+        (license . ,license:gpl3+)
+        (home-page . ,%guix-home-page-url)
+        (maintainers . (,%guix-bug-report-address))))))
 
 (define (hydra-jobs store arguments)
   "Return Hydra jobs."
diff --git a/gnu/ci.scm b/gnu/ci.scm
index 2329a38..c985cd6 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.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]