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'.master
parent
351f384e57
commit
9fe9594611
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -79,7 +79,8 @@ Otherwise return THING."
|
||||||
(match (command-line)
|
(match (command-line)
|
||||||
((command file cuirass? ...)
|
((command file cuirass? ...)
|
||||||
;; Load FILE, a Scheme file that defines Hydra jobs.
|
;; 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
|
(save-module-excursion
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(set-current-module %user-module)
|
(set-current-module %user-module)
|
||||||
|
@ -93,13 +94,15 @@ Otherwise return THING."
|
||||||
|
|
||||||
;; Grafts can trigger early builds. We do not want that to happen
|
;; Grafts can trigger early builds. We do not want that to happen
|
||||||
;; during evaluation, so use a sledgehammer to catch such problems.
|
;; 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
|
(set! build-things
|
||||||
(lambda (store . args)
|
(lambda (store . args)
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
"error: trying to build things during evaluation!~%")
|
"warning: building things during evaluation~%")
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
"'build-things' arguments: ~s~%" args)
|
"'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.
|
;; Call the entry point of FILE and print the resulting job sexp.
|
||||||
(pretty-print
|
(pretty-print
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; 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.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -21,35 +21,14 @@
|
||||||
;;; Guix as 'guix pull', which is defined in (guix self).
|
;;; 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)
|
(use-modules (guix store)
|
||||||
(guix config)
|
(guix config)
|
||||||
(guix utils)
|
(guix utils)
|
||||||
(guix grafts)
|
|
||||||
((guix packages) #:select (%hydra-supported-systems))
|
((guix packages) #:select (%hydra-supported-systems))
|
||||||
(guix derivations)
|
(guix derivations)
|
||||||
(guix monads)
|
(guix monads)
|
||||||
(guix gexp)
|
|
||||||
(guix self)
|
|
||||||
((guix licenses) #:prefix license:)
|
((guix licenses) #:prefix license:)
|
||||||
(srfi srfi-1)
|
(srfi srfi-1)
|
||||||
(srfi srfi-26)
|
|
||||||
(ice-9 match))
|
(ice-9 match))
|
||||||
|
|
||||||
;; XXX: Debugging hack: since `hydra-eval-guile-jobs' redirects the output
|
;; XXX: Debugging hack: since `hydra-eval-guile-jobs' redirects the output
|
||||||
|
@ -61,11 +40,12 @@
|
||||||
"Return a Hydra job a list building the modular Guix derivation from SOURCE
|
"Return a Hydra job a list building the modular Guix derivation from SOURCE
|
||||||
for SYSTEM. Use VERSION as the version identifier."
|
for SYSTEM. Use VERSION as the version identifier."
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
(define build
|
||||||
|
(primitive-load (string-append source "/build-aux/build-self.scm")))
|
||||||
|
|
||||||
`((derivation . ,(derivation-file-name
|
`((derivation . ,(derivation-file-name
|
||||||
(parameterize ((%graft? #f))
|
(run-with-store store
|
||||||
(run-with-store store
|
(build source #:version version #:system system))))
|
||||||
(lower-object (compiled-guix source
|
|
||||||
#:version version))))))
|
|
||||||
(description . "Modular Guix")
|
(description . "Modular Guix")
|
||||||
(long-description
|
(long-description
|
||||||
. "This is the modular Guix package as produced by 'guix pull'.")
|
. "This is the modular Guix package as produced by 'guix pull'.")
|
||||||
|
|
Reference in New Issue