summaryrefslogtreecommitdiff
path: root/guix/scripts/time-machine.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-08-09 17:37:54 +0200
committerLudovic Courtès <ludo@gnu.org>2021-08-09 18:14:37 +0200
commit7bd5f72918556359e502fee73e8a7b0e725b901f (patch)
treeaf4f2b474f2c107ff1bc7660a6ccd24a97b444d2 /guix/scripts/time-machine.scm
parent27f00963d31636eb94bb7f331989827f4782de78 (diff)
inferior: 'cached-channel-instance' no longer calls 'show-what-to-build'.
This allows the user of 'cached-channel-instance' to install the build handler of its choice. In particular, it allows "guix time-machine" to install a build notifier with the right options instead of using the defaults that 'cached-channel-instance' would pass to 'show-what-to-build*'. * guix/inferior.scm (cached-channel-instance): Remove call to 'show-what-to-build*'. (inferior-for-channels): Wrap body in 'with-build-handler'. * guix/scripts/time-machine.scm (guix-time-machine): Use 'with-build-handler'.
Diffstat (limited to 'guix/scripts/time-machine.scm')
-rw-r--r--guix/scripts/time-machine.scm14
1 files changed, 10 insertions, 4 deletions
diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm
index 4aafd432e8..5179ea035f 100644
--- a/guix/scripts/time-machine.scm
+++ b/guix/scripts/time-machine.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Konrad Hinsen <konrad.hinsen@fastmail.net>
-;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -141,13 +141,19 @@ Execute COMMAND ARGS... in an older version of Guix.\n"))
(let* ((opts (parse-args args))
(channels (channel-list opts))
(command-line (assoc-ref opts 'exec))
+ (substitutes? (assoc-ref opts 'substitutes?))
(authenticate? (assoc-ref opts 'authenticate-channels?)))
(when command-line
(let* ((directory
(with-store store
(with-status-verbosity (assoc-ref opts 'verbosity)
- (set-build-options-from-command-line store opts)
- (cached-channel-instance store channels
- #:authenticate? authenticate?))))
+ (with-build-handler (build-notifier #:use-substitutes?
+ substitutes?
+ #:verbosity
+ (assoc-ref opts 'verbosity)
+ #:dry-run? #f)
+ (set-build-options-from-command-line store opts)
+ (cached-channel-instance store channels
+ #:authenticate? authenticate?)))))
(executable (string-append directory "/bin/guix")))
(apply execl (cons* executable executable command-line))))))))