~ruther/guix-local

dce3a40bae7eaa65fd2cecb624aa530d0b0e3521 — Ludovic Courtès 13 years ago 5075e28
build: Fix `hydra.scm' recipe.

* hydra.scm: Redirect the output port to the error port.
  (package-job): Return a name/thunk pair.
  (hydra-jobs)[system]: Use either the `system' key (a symbol) in
  ARGUMENTS, or (%current-system)'.
1 files changed, 10 insertions(+), 2 deletions(-)

M hydra.scm
M hydra.scm => hydra.scm +10 -2
@@ 23,10 23,17 @@

(use-modules (guix store)
             (guix packages)
             ((guix utils) #:select (%current-system))
             (distro)
             (distro packages guile)
             (srfi srfi-26)
             (ice-9 match))

;; XXX: Debugging hack: since `hydra-eval-guile-jobs' redirects the output
;; port to the bit bucket, let us write to the error port instead.
(setvbuf (current-error-port) _IOLBF)
(set-current-output-port (current-error-port))

(define (package->alist store package system)
  "Convert PACKAGE to an alist suitable for Hydra."
  `((derivation . ,(package-derivation store package system))


@@ 37,12 44,13 @@

(define (package-job store job-name package system)
  "Return a job called JOB-NAME that builds PACKAGE on SYSTEM."
  `(,job-name . ,(package->alist store package system)))
  `(,job-name . ,(cut package->alist store package system)))

(define (hydra-jobs store arguments)
  "Return Hydra jobs."
  (define system
    (assoc-ref arguments "system"))
    (or (assoc-ref arguments system)
        (%current-system)))

  (map (match-lambda
        ((job-name (? package? package))