From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtfxB-00071Q-0p for guix-patches@gnu.org; Sun, 17 Sep 2017 16:14:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtfx6-0003fF-9E for guix-patches@gnu.org; Sun, 17 Sep 2017 16:14:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36627) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtfx6-0003f7-6B for guix-patches@gnu.org; Sun, 17 Sep 2017 16:14:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dtfx5-0000ES-Tb for guix-patches@gnu.org; Sun, 17 Sep 2017 16:14:03 -0400 Subject: [bug#28486] [PATCH 2/3] gnu-system: Accept subset with list of package names. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtfvw-0006vh-FH for guix-patches@gnu.org; Sun, 17 Sep 2017 16:12:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtfvr-00037c-ED for guix-patches@gnu.org; Sun, 17 Sep 2017 16:12:52 -0400 From: Jan Nieuwenhuizen Date: Sun, 17 Sep 2017 22:11:55 +0200 Message-Id: <20170917201157.9802-3-janneke@gnu.org> In-Reply-To: <20170917201157.9802-1-janneke@gnu.org> References: <20170917201157.9802-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 28486@debbugs.gnu.org * examples/gnu-system.scm (hydra-jobs): Accept subset with list of package names. --- examples/gnu-system.scm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/examples/gnu-system.scm b/examples/gnu-system.scm index 4076786..ee2b571 100644 --- a/examples/gnu-system.scm +++ b/examples/gnu-system.scm @@ -2,6 +2,7 @@ ;;; ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2016 Mathieu Lirzin +;;; Copyright © 2017 Jan Nieuwenhuizen ;;; ;;; This file is part of Cuirass. ;;; @@ -163,9 +164,10 @@ valid." "Return Hydra jobs." (define subset (match (assoc-ref arguments 'subset) - ("core" 'core) ; only build core packages - ("hello" 'hello) ; only build hello - (_ 'all))) ; build everything + ("core" 'core) ; only build core packages + ("hello" 'hello) ; only build hello + (((? string?) (? string?) ...) 'list) ; only build selected list of packages + (_ 'all))) ; build everything (define (cross-jobs system) (define (from-32-to-64? target) @@ -226,6 +228,16 @@ valid." (let ((hello (specification->package "hello"))) (list (package-job store (%job-name hello) hello system))) '())) + ((list) + ;; Build selected list of packages only. + (if (string=? system (%current-system)) + (let* ((names (assoc-ref arguments 'subset)) + (packages (map specification->package names))) + (map (lambda (package) + (package-job store (%job-name package) + package system)) + packages)) + '())) (else (error "unknown subset" subset)))) %hydra-supported-systems))) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com