diff options
author | Mark H Weaver <mhw@netris.org> | 2018-04-10 00:42:22 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2018-04-10 00:42:22 -0400 |
commit | f89aa1521af69b0e1a1350c2380579788b0f8945 (patch) | |
tree | 5009cca687ac669ef846920877cbfb6fffdd9893 /build-aux/hydra/guix-modular.scm | |
parent | 169c658f7f286efae397fa3eda55b1c56fa92a01 (diff) | |
parent | 60e1de6d95bd32b4996c199708541781b8f828fd (diff) | |
download | guix-f89aa1521af69b0e1a1350c2380579788b0f8945.tar guix-f89aa1521af69b0e1a1350c2380579788b0f8945.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'build-aux/hydra/guix-modular.scm')
-rw-r--r-- | build-aux/hydra/guix-modular.scm | 54 |
1 files changed, 16 insertions, 38 deletions
diff --git a/build-aux/hydra/guix-modular.scm b/build-aux/hydra/guix-modular.scm index bdbb2fa8d5..58e09e1831 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 <ludo@gnu.org> +;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org> ;;; ;;; 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,13 @@ "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 + #: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'.") @@ -76,29 +57,26 @@ for SYSTEM. Use VERSION as the version identifier." (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 - (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 (string-append "guix." system)))) `(,name . ,(build-job store file version system)))) - %hydra-supported-systems))) + systems))) |