guix-play/guix/scripts
Christopher Baines 112692c0d5
guix: Split (guix substitutes) from (guix scripts substitute).
This means there's a module for working with substitutes, rather than all the
code sitting in the script. The need for this can be seen with the weather and
challenge scripts, that now don't have to use code from the substitute script,
but can instead use the substitute module.

The separation here between the actual functionality of the substitute script
and the underlying functionality used both there and elsewhere should make
maintenance easier moving forward.

This commit just moves code, none of the code should have been changed
significantly.

* guix/scripts/substitute.scm (%narinfo-cache-directory, %narinfo-ttl,
%narinfo-negative-ttl, %narinfo-transient-error-ttl, %unreachable-hosts): Move
variables to guix/substitutes.scm.
(narinfo-cache-file, cached-narinfo, cache-narinfo!, narinfo-request,
read-to-eof, call-with-connection-error-handling, fetch-narinfos,
lookup-narinfos, lookup-narinfos/diverse): Move procedures to
guix/substitutes.scm.
* guix/substitutes.scm: New file.
* Makefile.am: Add it.
* guix/narinfo.scm: Remove redundant module.
* guix/scripts/challenge.scm: Change (guix scripts substitute) to (guix
substitutes).
* guix/scripts/weather.scm: Change (guix scripts substitute) to (guix
substitutes).
2021-03-05 21:06:03 +00:00
..
container scripts: container: Fix typo. 2019-09-23 11:56:40 -07:00
git Add 'guix git authenticate'. 2020-07-11 12:33:01 +02:00
import scripts: import: json: Fix error handling. 2021-01-31 21:49:59 +01:00
system guix system: Adjust 'upgrade-shepherd-services' to shepherd service change. 2021-01-30 18:23:52 +01:00
archive.scm archive: Note service type in ACL hint. 2021-01-20 18:49:29 +01:00
authenticate.scm authenticate: Encode strings as ISO-8859-1. 2020-09-15 14:40:20 +02:00
build.scm transformations: Show '--help-transform' only where applicable. 2020-11-21 12:39:14 +01:00
challenge.scm guix: Split (guix substitutes) from (guix scripts substitute). 2021-03-05 21:06:03 +00:00
container.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
copy.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
deploy.scm deploy: Let key-and-args exceptions through. 2020-11-26 23:39:15 +01:00
describe.scm guix describe: 'display-profile-content' checks the right generation. 2021-02-05 23:15:36 +01:00
discover.scm scripts: discover: Remove previous cache file. 2020-12-20 10:56:45 +01:00
download.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
edit.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
environment.scm environment: Allow compilation with Guile 2.2. 2021-03-01 17:45:50 +01:00
gc.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
git.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
graph.scm transformations: Show '--help-transform' only where applicable. 2020-11-21 12:39:14 +01:00
hash.scm guix hash: Honor '-H' when used alongside '-r'. 2021-01-04 11:51:48 +01:00
import.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
install.scm transformations: Show '--help-transform' only where applicable. 2020-11-21 12:39:14 +01:00
lint.scm scripts: lint: Display result of checkers on stdout. 2020-11-21 10:23:08 +00:00
offload.scm ssh: Use 'guix repl' instead of 'guile'. 2020-12-23 16:03:32 +01:00
pack.scm profiles: 'package->manifest-entry' preserves transformations by default. 2021-03-05 12:49:27 +01:00
package.scm profiles: 'package->manifest-entry' preserves transformations by default. 2021-03-05 12:49:27 +01:00
perform-download.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
processes.scm processes: Add '--format' and the "normalized" format. 2020-11-29 23:55:57 +01:00
publish.scm publish: Add support for zstd compression. 2021-01-13 22:24:19 +01:00
pull.scm pull: Expand help text for --{url,commit,branch}. 2021-03-05 19:07:31 +01:00
refresh.scm guix: refresh: Do not use argument jumping with ngettext. 2020-11-18 20:58:51 +01:00
remove.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
repl.scm describe: Save the original value of (program-arguments). 2020-09-19 22:52:36 +02:00
search.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
show.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
size.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
substitute.scm guix: Split (guix substitutes) from (guix scripts substitute). 2021-03-05 21:06:03 +00:00
system.scm scripts: system: Accept <image> records as input. 2021-02-17 10:57:02 +01:00
time-machine.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
upgrade.scm upgrade: Allow several regexps. 2020-12-01 11:34:10 +01:00
weather.scm guix: Split (guix substitutes) from (guix scripts substitute). 2021-03-05 21:06:03 +00:00