From 7e6d8d366a61f951936ed83371877ce006f679f6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 20 Jan 2019 00:20:34 +0100 Subject: ci: Use a valid 'current-guix'. This fixes a regression introduced in b5f8c2c88543158e8aca76aa98f9009f6b9e743a whereby 'current-guix' (needed by some of the system tests) would fail to build. Reported by Ricardo Wurmus . It also speeds up compilation of 'current-guix' since the channel instance is already compiled or can be built quickly compared to the default 'current-guix'. * gnu/packages/package-management.scm (current-guix-package): New variable. (current-guix): Honor it. * gnu/ci.scm (channel-build-system): New variable. (channel-instances->derivation): New procedure. (system-test-jobs): Add #:source and #:commit parameters. Define 'instance' and parameterize CURRENT-GUIX-PACKAGE. (hydra-jobs)[checkout, commit, source]: New variables. Pass #:source and #:commit to 'system-test-jobs'. --- gnu/packages/package-management.scm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'gnu/packages/package-management.scm') diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 2a33a93f39..05da8190b6 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -399,6 +399,12 @@ generated file." (_ #t))) +(define-public current-guix-package + ;; This parameter allows callers to override the package that 'current-guix' + ;; returns. This is useful when 'current-guix' cannot compute it by itself, + ;; for instance because it's not running from a source code checkout. + (make-parameter #f)) + (define-public current-guix (let* ((repository-root (canonicalize-path (string-append (current-source-directory) @@ -409,12 +415,13 @@ generated file." "Return a package representing Guix built from the current source tree. This works by adding the current source tree to the store (after filtering it out) and returning a package that uses that as its 'source'." - (package - (inherit guix) - (version (string-append (package-version guix) "+")) - (source (local-file repository-root "guix-current" - #:recursive? #t - #:select? (force select?))))))) + (or (current-guix-package) + (package + (inherit guix) + (version (string-append (package-version guix) "+")) + (source (local-file repository-root "guix-current" + #:recursive? #t + #:select? (force select?)))))))) ;;; -- cgit v1.2.3