GNU bug report logs -
#28487
[PATCH] cuirass: Add gnu-system build spec.
Previous Next
Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>
Date: Sun, 17 Sep 2017 20:14:04 UTC
Severity: normal
Tags: patch
Done: Jan Nieuwenhuizen <janneke <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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
[0001-cuirass-Add-cuirass-jobs.scm-target-to-compute-the-C.patch (text/x-patch, inline)]
From 8c547d1d6a76dfb5e3b59f7fce404d0b60c6d929 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke <at> gnu.org>
Date: Wed, 27 Sep 2017 22:44:56 +0200
Subject: [PATCH] cuirass: Add 'cuirass-jobs.scm' target to compute the Cuirass
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 © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
# Copyright © 2017 Leo Famulari <leo <at> famulari.name>
# Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
+# Copyright © 2017 Jan Nieuwenhuizen <janneke <at> gnu.org>
#
# 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" "$@"
+# 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 © 2016, 2017 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2017 Jan Nieuwenhuizen <janneke <at> 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)))
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
[Message part 3 (text/plain, inline)]
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
This bug report was last modified 7 years and 316 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.