From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxJKM-0006SD-La for guix-patches@gnu.org; Wed, 27 Sep 2017 16:53:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxJKI-0002Lp-Bl for guix-patches@gnu.org; Wed, 27 Sep 2017 16:53:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55023) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxJKI-0002Li-87 for guix-patches@gnu.org; Wed, 27 Sep 2017 16:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dxJKH-000254-VM for guix-patches@gnu.org; Wed, 27 Sep 2017 16:53:01 -0400 Subject: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. Resent-Message-ID: From: Jan Nieuwenhuizen References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> <87a81gq8dg.fsf@gnu.org> <87efqsexi4.fsf@gnu.org> <8760c3rifz.fsf@gnu.org> Date: Wed, 27 Sep 2017 22:52:01 +0200 In-Reply-To: <8760c3rifz.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 27 Sep 2017 22:32:32 +0200") Message-ID: <871smrrhji.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 28487@debbugs.gnu.org --=-=-= Content-Type: text/plain Jan Nieuwenhuizen writes: > ...looked into this briefly but this would mean adding some option to > evaluate.scm, something like > > ;; Without further ado... > (match (command-line) > - ((command file) > + ((command file cuirass? ...)) > ... > - (match ((module-ref %user-module 'hydra-jobs) store '()) > + (match ((module-ref %user-module > + (if (equal? cuirass? "cuirass") cuirass-jobs 'hydra-jobs) > ? store '()) Hmm, that could work---actual working prototype attached :-) janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-cuirass-Add-cuirass-jobs.scm-target-to-compute-the-C.patch Content-Transfer-Encoding: quoted-printable >From 8c547d1d6a76dfb5e3b59f7fce404d0b60c6d929 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 27 Sep 2017 22:44:56 +0200 Subject: [PATCH] cuirass: Add 'cuirass-jobs.scm' target to compute the Cuir= ass jobs. * build-aux/hydra/evaluate.scm: Support "cuirass" command line option. * Makefile.am (cuirass-jobs.scm): New target. --- Makefile.am | 10 ++++++++++ build-aux/hydra/evaluate.scm | 13 +++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index a178d53cb..2c87e4fe3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,6 +7,7 @@ # Copyright =C2=A9 2017 Mathieu Othacehe # Copyright =C2=A9 2017 Leo Famulari # Copyright =C2=A9 2017 Ricardo Wurmus +# Copyright =C2=A9 2017 Jan Nieuwenhuizen # # This file is part of GNU Guix. # @@ -708,6 +709,15 @@ hydra-jobs.scm: $(GOBJECTS) "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp" $(AM_V_at)mv "$@.tmp" "$@" =20 +# Compute the Cuirass jobs and write them in the target file. +cuirass-jobs.scm: $(GOBJECTS) + $(AM_V_at)$(MKDIR_P) "`dirname "$@"`" + $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \ + "$(top_srcdir)/build-aux/hydra/evaluate.scm" \ + "$(top_srcdir)/build-aux/cuirass/gnu-system.scm" \ + cuirass > "$@.tmp" + $(AM_V_at)mv "$@.tmp" "$@" + .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version .PHONY: assert-no-store-file-names assert-binaries-available .PHONY: assert-final-inputs-self-contained diff --git a/build-aux/hydra/evaluate.scm b/build-aux/hydra/evaluate.scm index cc6a4b949..604022abc 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 =C2=A9 2016, 2017 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2017 Jan Nieuwenhuizen ;;; ;;; 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." =20 ;; 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))) =20 --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--