diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-04-05 22:40:16 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-04-05 22:40:16 +0200 |
commit | 731b996255fb699cd91699f6cd22de41ebafcdcd (patch) | |
tree | 749b63309998feb1bf27033fe1dd28ff2ed35e15 /build-aux/hydra/gnu-system.scm | |
parent | 512314d738754eeb513a0d1b8074f635ab4f2f06 (diff) | |
download | guix-731b996255fb699cd91699f6cd22de41ebafcdcd.tar guix-731b996255fb699cd91699f6cd22de41ebafcdcd.tar.gz |
hydra: Add 'qemu-image' job.
* build-aux/hydra/demo-os.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
* build-aux/hydra/gnu-system.scm (qemu-jobs): New procedure.
(hydra-jobs): Use it.
* guix/scripts/system.scm (read-operating-system): Export.
Diffstat (limited to 'build-aux/hydra/gnu-system.scm')
-rw-r--r-- | build-aux/hydra/gnu-system.scm | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index 083ff2a7cd..6aa491a274 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -36,10 +36,14 @@ dir) (set! %load-path (cons dir %load-path)))))) -(use-modules (guix store) +(use-modules (guix config) + (guix store) (guix packages) (guix derivations) + (guix monads) + ((guix licenses) #:select (gpl3+)) ((guix utils) #:select (%current-system)) + ((guix scripts system) #:select (read-operating-system)) (gnu packages) (gnu packages gcc) (gnu packages base) @@ -49,6 +53,8 @@ (gnu packages compression) (gnu packages multiprecision) (gnu packages make-bootstrap) + (gnu system) + (gnu system vm) (srfi srfi-1) (srfi srfi-26) (ice-9 match)) @@ -108,6 +114,32 @@ SYSTEM." '("mips64el-linux-gnu" "mips64el-linux-gnuabi64")) +(define (qemu-jobs store system) + "Return a list of jobs that build QEMU images for SYSTEM." + (define (->alist drv) + `((derivation . ,drv) + (description . "Stand-alone QEMU image of the GNU system") + (long-description . "This is a demo stand-alone QEMU image of the GNU +system.") + (license . ,gpl3+) + (home-page . ,%guix-home-page-url) + (maintainers . ("bug-guix@gnu.org")))) + + (define (->job name drv) + (let ((name (symbol-append name (string->symbol ".") + (string->symbol system)))) + `(,name . ,(->alist drv)))) + + (if (string=? system "x86_64-linux") + (let* ((dir (dirname (assoc-ref (current-source-location) 'filename))) + (file (string-append dir "/demo-os.scm")) + (os (read-operating-system file))) + (if (operating-system? os) + (list (->job 'qemu-image + (run-with-store store (system-qemu-image os)))) + '())) + '())) + (define (hydra-jobs store arguments) "Return Hydra jobs." (define systems @@ -156,7 +188,8 @@ SYSTEM." (cons (package-job store (job-name package) package system) result))) - (cross-jobs system))) + (append (qemu-jobs store system) + (cross-jobs system)))) ((core) ;; Build core packages only. (append (map (lambda (package) |