summaryrefslogtreecommitdiff
path: root/hydra.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-11-21 00:57:47 +0100
committerLudovic Courtès <ludo@gnu.org>2012-11-21 00:57:47 +0100
commitdce3a40bae7eaa65fd2cecb624aa530d0b0e3521 (patch)
tree1209344e8b9637b7073da2e82f5de8cff227c058 /hydra.scm
parent5075e28305e633837c214706dd09d3db3ec75eb1 (diff)
downloadpatches-dce3a40bae7eaa65fd2cecb624aa530d0b0e3521.tar
patches-dce3a40bae7eaa65fd2cecb624aa530d0b0e3521.tar.gz
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)'.
Diffstat (limited to 'hydra.scm')
-rw-r--r--hydra.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/hydra.scm b/hydra.scm
index 4016a69d75..312358b9f9 100644
--- a/hydra.scm
+++ b/hydra.scm
@@ -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))