me
/
guix
Archived
1
0
Fork 0

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.
master
Mathieu Othacehe 2020-10-01 11:46:53 +02:00
parent 5627bfe45c
commit 3ca014d1df
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
2 changed files with 41 additions and 31 deletions

View File

@ -43,17 +43,19 @@ for SYSTEM. Use VERSION as the version identifier."
(define build (define build
(primitive-load (string-append source "/build-aux/build-self.scm"))) (primitive-load (string-append source "/build-aux/build-self.scm")))
`((derivation . ,(derivation-file-name (let ((drv (run-with-store store
(run-with-store store (build source #:version version #:system system
(build source #:version version #:system system #:pull-version 1
#:pull-version 1 #:guile-version "2.2"))))
#:guile-version "2.2")))) ;the latest 2.2.x `((derivation . ,(derivation-file-name drv)) ;the latest 2.2.x
(description . "Modular Guix") (nix-name . ,(derivation-name drv))
(long-description (system . ,(derivation-system drv))
. "This is the modular Guix package as produced by 'guix pull'.") (description . "Modular Guix")
(license . ,license:gpl3+) (long-description
(home-page . ,%guix-home-page-url) . "This is the modular Guix package as produced by 'guix pull'.")
(maintainers . (,%guix-bug-report-address))))) (license . ,license:gpl3+)
(home-page . ,%guix-home-page-url)
(maintainers . (,%guix-bug-report-address))))))
(define (hydra-jobs store arguments) (define (hydra-jobs store arguments)
"Return Hydra jobs." "Return Hydra jobs."

View File

@ -75,28 +75,30 @@
#:optional (package-derivation package-derivation)) #:optional (package-derivation package-derivation))
"Convert PACKAGE to an alist suitable for Hydra." "Convert PACKAGE to an alist suitable for Hydra."
(parameterize ((%graft? #f)) (parameterize ((%graft? #f))
`((derivation . ,(derivation-file-name (let ((drv (package-derivation store package system
(package-derivation store package system #:graft? #f)))
#:graft? #f))) `((derivation . ,(derivation-file-name drv))
(description . ,(package-synopsis package)) (nix-name . ,(derivation-name drv))
(long-description . ,(package-description package)) (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 ;; XXX: Hydra ignores licenses that are not a <license> structure or a
;; list thereof. ;; list thereof.
(license . ,(let loop ((license (package-license package))) (license . ,(let loop ((license (package-license package)))
(match license (match license
((? license?) ((? license?)
(license-name license)) (license-name license))
((lst ...) ((lst ...)
(map loop license))))) (map loop license)))))
(home-page . ,(package-home-page package)) (home-page . ,(package-home-page package))
(maintainers . ("bug-guix@gnu.org")) (maintainers . ("bug-guix@gnu.org"))
(max-silent-time . ,(or (assoc-ref (package-properties package) (max-silent-time . ,(or (assoc-ref (package-properties package)
'max-silent-time) 'max-silent-time)
3600)) ;1 hour by default 3600)) ;1 hour by default
(timeout . ,(or (assoc-ref (package-properties package) 'timeout) (timeout . ,(or (assoc-ref (package-properties package) 'timeout)
72000))))) ;20 hours by default 72000)))))) ;20 hours by default
(define (package-job store job-name package system) (define (package-job store job-name package system)
"Return a job called JOB-NAME that builds PACKAGE on 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." "Return a list of jobs that build images for SYSTEM."
(define (->alist drv) (define (->alist drv)
`((derivation . ,(derivation-file-name drv)) `((derivation . ,(derivation-file-name drv))
(nix-name . ,(derivation-name drv))
(system . ,(derivation-system drv))
(description . "Stand-alone image of the GNU system") (description . "Stand-alone image of the GNU system")
(long-description . "This is a demo stand-alone image of the GNU (long-description . "This is a demo stand-alone image of the GNU
system.") system.")
@ -304,6 +308,8 @@ system.")
(system-test-value test)))) (system-test-value test))))
`((derivation . ,(derivation-file-name drv)) `((derivation . ,(derivation-file-name drv))
(nix-name . ,(derivation-name drv))
(system . ,(derivation-system drv))
(description . ,(format #f "Guix '~a' system test" (description . ,(format #f "Guix '~a' system test"
(system-test-name test))) (system-test-name test)))
(long-description . ,(system-test-description test)) (long-description . ,(system-test-description test))
@ -333,6 +339,8 @@ system.")
"Return Hydra jobs to build the self-contained Guix binary tarball." "Return Hydra jobs to build the self-contained Guix binary tarball."
(define (->alist drv) (define (->alist drv)
`((derivation . ,(derivation-file-name drv)) `((derivation . ,(derivation-file-name drv))
(nix-name . ,(derivation-name drv))
(system . ,(derivation-system drv))
(description . "Stand-alone binary Guix tarball") (description . "Stand-alone binary Guix tarball")
(long-description . "This is a tarball containing binaries of Guix and (long-description . "This is a tarball containing binaries of Guix and
all its dependencies, and ready to be installed on \"foreign\" distributions.") all its dependencies, and ready to be installed on \"foreign\" distributions.")