From b5033c5a9e1b1f06a7daf9b8de6ff9f9c8431a97 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 7 Nov 2017 17:06:32 +0100 Subject: hydra: Factorize package list creation. * build-aux/hydra/gnu-system.scm (all-packages): New procedure, with body taken from... (hydra-jobs): ... here. Use it. --- build-aux/hydra/gnu-system.scm | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'build-aux') diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index 146d929f9b..1782969bf8 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -261,6 +261,19 @@ valid." (else #f))))) +(define (all-packages) + "Return the list of packages to build." + (fold-packages (lambda (package result) + (cond ((package-replacement package) + (cons* package ;build both + (package-replacement package) + result)) + ((package-superseded package) + result) ;don't build it + (else + (cons package result)))) + '())) + ;;; ;;; Hydra entry point. @@ -317,17 +330,7 @@ valid." (case subset ((all) ;; Build everything, including replacements. - (let ((all (fold-packages - (lambda (package result) - (cond ((package-replacement package) - (cons* package - (package-replacement package) - result)) - ((package-superseded package) - result) ;don't build it - (else - (cons package result)))) - '())) + (let ((all (all-packages)) (job (lambda (package) (package->job store package system)))) -- cgit v1.2.3 From 25a5b187e8f3efe4b80fd2d005b04d89e1a85d67 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 7 Nov 2017 17:08:10 +0100 Subject: hydra: Build hidden packages. * build-aux/hydra/gnu-system.scm (all-packages): Pass #:select? to 'fold-packages'. --- build-aux/hydra/gnu-system.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build-aux') diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index 1782969bf8..2e29cbaebc 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -272,7 +272,8 @@ valid." result) ;don't build it (else (cons package result)))) - '())) + '() + #:select? (const #t))) ;include hidden packages ;;; -- cgit v1.2.3 From b574cee361bdabf21f5506252b6a183dcfcd028d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 7 Nov 2017 18:06:46 +0100 Subject: hydra: Add jobs for all of '%final-inputs'. * build-aux/hydra/gnu-system.scm (package->job): Create a 'base.' job when PACKAGE is a member of BASE-PACKAGES. (all-packages)[adjust]: New procedure. Fold over %FINAL-INPUTS and add it to the result. --- build-aux/hydra/gnu-system.scm | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'build-aux') diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index 2e29cbaebc..d9b9c55d9c 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -251,7 +251,8 @@ all its dependencies, and ready to be installed on non-GuixSD distributions.") "Return a job for PACKAGE on SYSTEM, or #f if this combination is not valid." (cond ((member package base-packages) - #f) + (package-job store (symbol-append 'base. (job-name package)) + package system)) ((supported-package? package system) (let ((drv (package-derivation store package system #:graft? #f))) @@ -263,16 +264,21 @@ valid." (define (all-packages) "Return the list of packages to build." - (fold-packages (lambda (package result) - (cond ((package-replacement package) - (cons* package ;build both - (package-replacement package) - result)) - ((package-superseded package) - result) ;don't build it - (else - (cons package result)))) - '() + (define (adjust package result) + (cond ((package-replacement package) + (cons* package ;build both + (package-replacement package) + result)) + ((package-superseded package) + result) ;don't build it + (else + (cons package result)))) + + (fold-packages adjust + (fold adjust '() ;include base packages + (match (%final-inputs) + (((labels packages _ ...) ...) + packages))) #:select? (const #t))) ;include hidden packages -- cgit v1.2.3