aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-11-10 21:42:50 +0100
committerLudovic Courtès <ludo@gnu.org>2023-12-11 23:19:00 +0100
commit7e113695864f8e8a8f6b642c95175094971cdb85 (patch)
tree7e49e7bcf68c96b91f59cc903f84f2a2ae29e787 /guix/scripts
parentf63a8c5ca20edbf8fad21542712554f38f544e9b (diff)
downloadguix-7e113695864f8e8a8f6b642c95175094971cdb85.tar
guix-7e113695864f8e8a8f6b642c95175094971cdb85.tar.gz
weather: Use the same substitute URLs as guix-daemon.
* guix/scripts/weather.scm (%default-options): Remove ‘substitute-urls’. (guix-weather): Call ‘substitute-urls’ when OPTS doesn’t have it. Warn when ‘substitute-urls’ returns #f. * doc/guix.texi (Invoking guix weather): Adjust accordingly. Change-Id: I3e9100074f2ad559e5c408660db70430d64f2bef
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/weather.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 140df3435f..7e302fcea7 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
@@ -391,7 +391,7 @@ Report the availability of substitutes.\n"))
%standard-native-build-options))
(define %default-options
- `((substitute-urls . ,%default-substitute-urls)))
+ '())
(define (load-manifest file)
"Load the manifest from FILE and return the list of packages it refers to."
@@ -582,7 +582,13 @@ SERVER. Display information for packages with at least THRESHOLD dependents."
(let* ((opts (parse-command-line args %options
(list %default-options)
#:build-options? #f))
- (urls (assoc-ref opts 'substitute-urls))
+ (urls (or (assoc-ref opts 'substitute-urls)
+ (with-store store
+ (substitute-urls store))
+ (begin
+ (warning (G_ "could not determine current \
+substitute URLs; using defaults~%"))
+ %default-substitute-urls)))
(systems (match (filter-map (match-lambda
(('system . system) system)
(_ #f))