diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-08-02 22:00:36 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-08-08 11:54:24 +0200 |
| commit | cd1a98b928be9602ebf103744164ace7bfcae22c (patch) | |
| tree | 57f6430046136a8521c98b931b3b42558cc4e362 | |
| parent | 445a0d134ce735577d1e22f210c2e5ceafc56762 (diff) | |
installer: Render the final configuration with (guix read-print).
* gnu/installer.scm (module-to-import?): Return #t for (guix read-print).
* gnu/installer/steps.scm (configuration->file): Use
'pretty-print-with-comments/splice' instead of 'for-each' and 'pretty-print'.
| -rw-r--r-- | gnu/installer.scm | 3 | ||||
| -rw-r--r-- | gnu/installer/steps.scm | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/gnu/installer.scm b/gnu/installer.scm index 415f5a7af78..8a6e604fa52 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> | 4 | ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
| 5 | ;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de> | 5 | ;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de> |
| 6 | ;;; | 6 | ;;; |
| @@ -63,6 +63,7 @@ | |||
| 63 | (('gnu 'installer _ ...) #t) | 63 | (('gnu 'installer _ ...) #t) |
| 64 | (('gnu 'build _ ...) #t) | 64 | (('gnu 'build _ ...) #t) |
| 65 | (('guix 'build _ ...) #t) | 65 | (('guix 'build _ ...) #t) |
| 66 | (('guix 'read-print) #t) | ||
| 66 | (_ #f))) | 67 | (_ #f))) |
| 67 | 68 | ||
| 68 | (define not-config? | 69 | (define not-config? |
diff --git a/gnu/installer/steps.scm b/gnu/installer/steps.scm index 8bc38181a7d..f1d61a2bc5e 100644 --- a/gnu/installer/steps.scm +++ b/gnu/installer/steps.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; | 4 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| 6 | ;;; | 6 | ;;; |
| @@ -21,9 +21,9 @@ | |||
| 21 | #:use-module (guix records) | 21 | #:use-module (guix records) |
| 22 | #:use-module (guix build utils) | 22 | #:use-module (guix build utils) |
| 23 | #:use-module (guix i18n) | 23 | #:use-module (guix i18n) |
| 24 | #:use-module (guix read-print) | ||
| 24 | #:use-module (gnu installer utils) | 25 | #:use-module (gnu installer utils) |
| 25 | #:use-module (ice-9 match) | 26 | #:use-module (ice-9 match) |
| 26 | #:use-module (ice-9 pretty-print) | ||
| 27 | #:use-module (srfi srfi-1) | 27 | #:use-module (srfi srfi-1) |
| 28 | #:use-module (srfi srfi-34) | 28 | #:use-module (srfi srfi-34) |
| 29 | #:use-module (srfi srfi-35) | 29 | #:use-module (srfi srfi-35) |
| @@ -244,11 +244,9 @@ found in RESULTS." | |||
| 244 | ;; by the graphical installer.\n") | 244 | ;; by the graphical installer.\n") |
| 245 | port) | 245 | port) |
| 246 | (newline port) | 246 | (newline port) |
| 247 | (for-each (lambda (part) | 247 | (pretty-print-with-comments/splice port configuration |
| 248 | (if (null? part) | 248 | #:max-width 75) |
| 249 | (newline port) | 249 | |
| 250 | (pretty-print part port))) | ||
| 251 | configuration) | ||
| 252 | (flush-output-port port)))) | 250 | (flush-output-port port)))) |
| 253 | 251 | ||
| 254 | ;;; Local Variables: | 252 | ;;; Local Variables: |
