From 351f384e57939005b25fa976952e3a0e08785893 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 27 Mar 2018 09:48:16 +0200 Subject: cuirass: Add job specs for the modular Guix. * build-aux/cuirass/guix-modular.scm: New file. * Makefile.am (EXTRA_DIST): Add it. --- build-aux/hydra/guix-modular.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'build-aux/hydra/guix-modular.scm') diff --git a/build-aux/hydra/guix-modular.scm b/build-aux/hydra/guix-modular.scm index bdbb2fa8d5..b6ba7040ba 100644 --- a/build-aux/hydra/guix-modular.scm +++ b/build-aux/hydra/guix-modular.scm @@ -86,15 +86,16 @@ (define systems (list (%current-system))))) (define guix-checkout - (assq-ref arguments 'guix)) + (or (assq-ref arguments 'guix) ;Hydra on hydra + (assq-ref arguments 'guix-modular))) ;Cuirass on berlin (define version (or (assq-ref guix-checkout 'revision) "0.unknown")) (let ((file (assq-ref guix-checkout 'file-name))) - (format (current-error-port) "using checkout ~s (~s)~%" - guix-checkout file) + (format (current-error-port) "using checkout ~s (~s; arguments: ~s)~%" + guix-checkout file arguments) (map (lambda (system) (let ((name (string->symbol -- cgit v1.2.3 From 9fe95946118e9530504699360b1ca3507fa0360d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 29 Mar 2018 17:30:12 +0200 Subject: hydra: 'guix-modular' jobs use the new 'build-self'. * build-aux/hydra/guix-modular.scm: Remove 'eval-when' form that fiddled with '%load-path'. (build-job): Load 'build-aux/build-self.scm' and call the procedure it returns. * build-aux/hydra/evaluate.scm: The 'build-things' replacement no longer calls 'exit'. --- build-aux/hydra/evaluate.scm | 11 +++++++---- build-aux/hydra/guix-modular.scm | 32 ++++++-------------------------- 2 files changed, 13 insertions(+), 30 deletions(-) (limited to 'build-aux/hydra/guix-modular.scm') diff --git a/build-aux/hydra/evaluate.scm b/build-aux/hydra/evaluate.scm index 8e391f44fd..5793c022ff 100644 --- a/build-aux/hydra/evaluate.scm +++ b/build-aux/hydra/evaluate.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017 Ludovic Courtès +;;; Copyright © 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2017 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. @@ -79,7 +79,8 @@ (define (assert-valid-job job thing) (match (command-line) ((command file cuirass? ...) ;; Load FILE, a Scheme file that defines Hydra jobs. - (let ((port (current-output-port))) + (let ((port (current-output-port)) + (real-build-things build-things)) (save-module-excursion (lambda () (set-current-module %user-module) @@ -93,13 +94,15 @@ (define (assert-valid-job job thing) ;; Grafts can trigger early builds. We do not want that to happen ;; during evaluation, so use a sledgehammer to catch such problems. + ;; An exception, though, is the evaluation of Guix itself, which + ;; requires building a "trampoline" program. (set! build-things (lambda (store . args) (format (current-error-port) - "error: trying to build things during evaluation!~%") + "warning: building things during evaluation~%") (format (current-error-port) "'build-things' arguments: ~s~%" args) - (exit 1))) + (apply real-build-things store args))) ;; Call the entry point of FILE and print the resulting job sexp. (pretty-print diff --git a/build-aux/hydra/guix-modular.scm b/build-aux/hydra/guix-modular.scm index b6ba7040ba..7a05c86bca 100644 --- a/build-aux/hydra/guix-modular.scm +++ b/build-aux/hydra/guix-modular.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017 Ludovic Courtès +;;; Copyright © 2017, 2018 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,35 +21,14 @@ ;;; Guix as 'guix pull', which is defined in (guix self). ;;; -;; Attempt to use our very own Guix modules. -(eval-when (compile load eval) - - ;; Ignore any available .go, and force recompilation. This is because our - ;; checkout in the store has mtime set to the epoch, and thus .go files look - ;; newer, even though they may not correspond. - (set! %fresh-auto-compile #t) - - (and=> (assoc-ref (current-source-location) 'filename) - (lambda (file) - (let ((dir (canonicalize-path - (string-append (dirname file) "/../..")))) - (format (current-error-port) "prepending ~s to the load path~%" - dir) - (set! %load-path (cons dir %load-path)))))) - - (use-modules (guix store) (guix config) (guix utils) - (guix grafts) ((guix packages) #:select (%hydra-supported-systems)) (guix derivations) (guix monads) - (guix gexp) - (guix self) ((guix licenses) #:prefix license:) (srfi srfi-1) - (srfi srfi-26) (ice-9 match)) ;; XXX: Debugging hack: since `hydra-eval-guile-jobs' redirects the output @@ -61,11 +40,12 @@ (define* (build-job store source version system) "Return a Hydra job a list building the modular Guix derivation from SOURCE for SYSTEM. Use VERSION as the version identifier." (lambda () + (define build + (primitive-load (string-append source "/build-aux/build-self.scm"))) + `((derivation . ,(derivation-file-name - (parameterize ((%graft? #f)) - (run-with-store store - (lower-object (compiled-guix source - #:version version)))))) + (run-with-store store + (build source #:version version #:system system)))) (description . "Modular Guix") (long-description . "This is the modular Guix package as produced by 'guix pull'.") -- cgit v1.2.3 From 16c28becf2a2fcd48f52b83dc17889587b806615 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 8 Apr 2018 19:51:22 +0200 Subject: hydra: guix-modular: Explicitly build for the latest 2.2. * build-aux/hydra/guix-modular.scm (build-job): Pass #:guile-version to 'build'. --- build-aux/hydra/guix-modular.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build-aux/hydra/guix-modular.scm') diff --git a/build-aux/hydra/guix-modular.scm b/build-aux/hydra/guix-modular.scm index 7a05c86bca..2885759df0 100644 --- a/build-aux/hydra/guix-modular.scm +++ b/build-aux/hydra/guix-modular.scm @@ -45,7 +45,8 @@ (define build `((derivation . ,(derivation-file-name (run-with-store store - (build source #:version version #:system system)))) + (build source #:version version #:system system + #:guile-version "2.2")))) ;the latest 2.2.x (description . "Modular Guix") (long-description . "This is the modular Guix package as produced by 'guix pull'.") -- cgit v1.2.3 From 98cda1b997442524ec8027fa1c1f9643eba6154b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 8 Apr 2018 22:07:47 +0200 Subject: hydra: guix-modular: Honor the 'systems' argument. * build-aux/hydra/guix-modular.scm (hydra-jobs)[systems]: Define as in gnu-system.scm. Honor SYSTEMS. --- build-aux/hydra/guix-modular.scm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'build-aux/hydra/guix-modular.scm') diff --git a/build-aux/hydra/guix-modular.scm b/build-aux/hydra/guix-modular.scm index 2885759df0..58e09e1831 100644 --- a/build-aux/hydra/guix-modular.scm +++ b/build-aux/hydra/guix-modular.scm @@ -57,14 +57,10 @@ (define build (define (hydra-jobs store arguments) "Return Hydra jobs." (define systems - (match (filter-map (match-lambda - (('system . value) value) - (_ #f)) - arguments) - ((lst ..1) - lst) - (_ - (list (%current-system))))) + (match (assoc-ref arguments 'systems) + (#f %hydra-supported-systems) + ((lst ...) lst) + ((? string? str) (call-with-input-string str read)))) (define guix-checkout (or (assq-ref arguments 'guix) ;Hydra on hydra @@ -83,4 +79,4 @@ (define version (string-append "guix." system)))) `(,name . ,(build-job store file version system)))) - %hydra-supported-systems))) + systems))) -- cgit v1.2.3