diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-01-20 00:20:34 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-01-20 01:42:11 +0100 |
commit | 7e6d8d366a61f951936ed83371877ce006f679f6 (patch) | |
tree | 76f2bdc2143775643fa3cebf27af684caaddcbff /gnu/packages/package-management.scm | |
parent | 38b77f34640ff8a491913d29abcd16a846f2d0e4 (diff) | |
download | guix-7e6d8d366a61f951936ed83371877ce006f679f6.tar.gz |
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 <rekado@elephly.net>. 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'.
Diffstat (limited to 'gnu/packages/package-management.scm')
-rw-r--r-- | gnu/packages/package-management.scm | 19 |
1 files changed, 13 insertions, 6 deletions
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?)))))))) ;;; |