diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-12-04 11:33:16 +0100 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-12-11 21:37:07 +0100 |
commit | 8361817bf693742757b096468198626f297bb09e (patch) | |
tree | fe2008436678b49cb81f66811345e0474da2bafe /gnu/installer/utils.scm | |
parent | 6ca66f641485cc5a06ba7d34b9c36b738ea1d654 (diff) | |
download | guix-8361817bf693742757b096468198626f297bb09e.tar.gz |
install: Discover local substitute servers.
* gnu/installer/substitutes.scm: New file. * gnu/installer/newt/substitutes.scm: New file. * gnu/local.mk (INSTALLER_MODULES): Add them. * po/guix/POTFILES.in: Add gnu/installer/newt/substitutes.scm. * gnu/installer/proxy.scm (with-silent-shepherd): Move to ... * gnu/installer/utils.scm: ... here. * gnu/installer/record.scm (<installer>)[substitutes-page]: New field. * gnu/installer/newt.scm (substitutes-page): New procedure, (newt-installer): register it. * gnu/installer.scm (installer-steps): Add "substitutes-page" step. * gnu/system/install.scm (%installation-services): Add avahi-service-type and enable substitute server discover in guix-service-type. [<name-service-switch>]: Set it to %mdns-host-lookup-nss.
Diffstat (limited to 'gnu/installer/utils.scm')
-rw-r--r-- | gnu/installer/utils.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm index a7fa66a199..bb97bc5560 100644 --- a/gnu/installer/utils.scm +++ b/gnu/installer/utils.scm @@ -18,6 +18,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu installer utils) + #:use-module (gnu services herd) #:use-module (guix utils) #:use-module (guix build utils) #:use-module (guix i18n) @@ -43,7 +44,9 @@ with-server-socket current-server-socket current-clients - send-to-clients)) + send-to-clients + + with-silent-shepherd)) (define* (read-lines #:optional (port (current-input-port))) "Read lines from PORT and return them as a list." @@ -233,3 +236,9 @@ accepting socket." (current-clients (reverse remainder)) exp) + +(define-syntax-rule (with-silent-shepherd exp ...) + "Evaluate EXP while discarding shepherd messages." + (parameterize ((shepherd-message-port + (%make-void-port "w"))) + exp ...)) |