build: Have `hydra.scm' return one job per package.

* hydra.scm (hydra-jobs): Return one job for each non-bootstrap package.
This commit is contained in:
Ludovic Courtès 2012-11-25 17:12:46 +01:00
parent 52bda18abf
commit bdd7eb270d
1 changed files with 22 additions and 12 deletions

View File

@ -25,7 +25,9 @@
(guix packages) (guix packages)
((guix utils) #:select (%current-system)) ((guix utils) #:select (%current-system))
(distro) (distro)
(distro packages base)
(distro packages guile) (distro packages guile)
(srfi srfi-1)
(srfi srfi-26) (srfi srfi-26)
(ice-9 match)) (ice-9 match))
@ -40,7 +42,8 @@
(description . ,(package-synopsis package)) (description . ,(package-synopsis package))
(long-description . ,(package-description package)) (long-description . ,(package-description package))
(license . ,(package-license package)) (license . ,(package-license package))
(maintainers . ("gnu-system-discuss@gnu.org")))) (home-page . ,(package-home-page package))
(maintainers . ("bug-guix@gnu.org"))))
(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."
@ -52,14 +55,21 @@
(or (assoc-ref arguments system) (or (assoc-ref arguments system)
(%current-system))) (%current-system)))
(map (match-lambda ;; Return one job for each package, except bootstrap packages.
((job-name (? package? package)) (let ((base-packages (delete-duplicates
(package-job store job-name package system)) (append-map (match-lambda
((job-name (? string? name)) ((_ package _ ...)
(package-job store job-name (match (package-transitive-inputs
(car (find-packages-by-name name)) package)
system))) (((_ inputs _ ...) ...)
`((hello "hello") inputs))))
(gmp "gmp") %final-inputs))))
(guile_2_0 ,guile-2.0) (fold-packages (lambda (package result)
(guile_1_8 ,guile-1.8)))) (if (member package base-packages)
result
(let ((name (string->symbol
(package-full-name package))))
(cons (package-job store name package
system)
result))))
'())))