diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2017-10-01 19:59:55 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2017-10-01 22:16:22 +0300 |
commit | 64df08f0cfac8f7a329002afa3461fd62a4b229c (patch) | |
tree | 019909423138ceb49cdd86f1af48d366503db68f /build-aux | |
parent | b83ad3ace56c65a367e8f58c7b78323cf251b94b (diff) | |
parent | 0ef1c223071869488c35b72b7407234c11425589 (diff) | |
download | guix-64df08f0cfac8f7a329002afa3461fd62a4b229c.tar guix-64df08f0cfac8f7a329002afa3461fd62a4b229c.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/compile-all.scm | 3 | ||||
-rw-r--r-- | build-aux/cuirass/gnu-system.scm | 47 | ||||
-rw-r--r-- | build-aux/hydra/evaluate.scm | 13 | ||||
-rw-r--r-- | build-aux/hydra/gnu-system.scm | 19 |
4 files changed, 77 insertions, 5 deletions
diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm index 147bb80196..fe25c5d065 100644 --- a/build-aux/compile-all.scm +++ b/build-aux/compile-all.scm @@ -27,7 +27,8 @@ ;; FIXME: 'format' is missing because it reports "non-literal format ;; strings" due to the fact that we use 'G_' instead of '_'. We'll need ;; help from Guile to solve this. - '(unsupported-warning unbound-variable arity-mismatch)) + '(unsupported-warning unbound-variable arity-mismatch + macro-use-before-definition)) ;new in 2.2 (define host (getenv "host")) diff --git a/build-aux/cuirass/gnu-system.scm b/build-aux/cuirass/gnu-system.scm new file mode 100644 index 0000000000..c88267b9d8 --- /dev/null +++ b/build-aux/cuirass/gnu-system.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +;;; +;;; This file defines build jobs for the Cuirass continuation integration +;;; tool. +;;; + +(include-from-path "build-aux/hydra/gnu-system.scm") + +(use-modules ((guix licenses) + #:select (license? license-name license-uri license-comment))) + +(define (cuirass-jobs store arguments) + "Return Cuirass jobs." + (map hydra-job->cuirass-job (hydra-jobs store arguments))) + +(define (hydra-job->cuirass-job hydra-job) + (let ((name (car hydra-job)) + (job ((cdr hydra-job)))) + (lambda _ (acons #:job-name (symbol->string name) + (map symbol-alist-entry->keyword-alist-entry job))))) + +(define (symbol-alist-entry->keyword-alist-entry entry) + (cons (symbol->keyword (car entry)) (entry->sexp-entry (cdr entry)))) + +(define (entry->sexp-entry o) + (match o + ((? license?) `((name . (license-name o)) + (uri . ,(license-uri o)) + (comment . ,(license-comment o)))) + (_ o))) diff --git a/build-aux/hydra/evaluate.scm b/build-aux/hydra/evaluate.scm index cc6a4b9492..604022abcf 100644 --- a/build-aux/hydra/evaluate.scm +++ b/build-aux/hydra/evaluate.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -70,7 +71,7 @@ Otherwise return THING." ;; Without further ado... (match (command-line) - ((command file) + ((command file cuirass? ...) ;; Load FILE, a Scheme file that defines Hydra jobs. (let ((port (current-output-port))) (save-module-excursion @@ -96,7 +97,11 @@ Otherwise return THING." ;; Call the entry point of FILE and print the resulting job sexp. (pretty-print - (match ((module-ref %user-module 'hydra-jobs) store '()) + (match ((module-ref %user-module + (if (equal? cuirass? "cuirass") + 'cuirass-jobs + 'hydra-jobs)) + store '()) (((names . thunks) ...) (map (lambda (job thunk) (format (current-error-port) "evaluating '~a'... " job) @@ -107,8 +112,8 @@ Otherwise return THING." names thunks))) port)))) ((command _ ...) - (format (current-error-port) "Usage: ~a FILE -Evaluate the Hydra jobs defined in FILE.~%" + (format (current-error-port) "Usage: ~a FILE [cuirass] +Evaluate the Hydra or Cuirass jobs defined in FILE.~%" command) (exit 1))) diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index 73bd566f7c..146d929f9b 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -270,6 +271,8 @@ valid." (define subset (match (assoc-ref arguments 'subset) ("core" 'core) ; only build core packages + ("hello" 'hello) ; only build hello + (((? string?) (? string?) ...) 'list) ; only build selected list of packages (_ 'all))) ; build everything (define (cross-jobs system) @@ -340,6 +343,22 @@ valid." package system)) %core-packages) (cross-jobs system))) + ((hello) + ;; Build hello package only. + (if (string=? system (%current-system)) + (let ((hello (specification->package "hello"))) + (list (package-job store (job-name hello) hello system))) + '())) + ((list) + ;; Build selected list of packages only. + (if (string=? system (%current-system)) + (let* ((names (assoc-ref arguments 'subset)) + (packages (map specification->package names))) + (map (lambda (package) + (package-job store (job-name package) + package system)) + packages)) + '())) (else (error "unknown subset" subset)))) %hydra-supported-systems))) |