mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
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'.
This commit is contained in:
parent
445a0d134c
commit
cd1a98b928
2 changed files with 7 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
|
||||
;;;
|
||||
|
@ -63,6 +63,7 @@ (define module-to-import?
|
|||
(('gnu 'installer _ ...) #t)
|
||||
(('gnu 'build _ ...) #t)
|
||||
(('guix 'build _ ...) #t)
|
||||
(('guix 'read-print) #t)
|
||||
(_ #f)))
|
||||
|
||||
(define not-config?
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -21,9 +21,9 @@ (define-module (gnu installer steps)
|
|||
#:use-module (guix records)
|
||||
#:use-module (guix build utils)
|
||||
#:use-module (guix i18n)
|
||||
#:use-module (guix read-print)
|
||||
#:use-module (gnu installer utils)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 pretty-print)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-34)
|
||||
#:use-module (srfi srfi-35)
|
||||
|
@ -244,11 +244,9 @@ (define* (configuration->file configuration
|
|||
;; by the graphical installer.\n")
|
||||
port)
|
||||
(newline port)
|
||||
(for-each (lambda (part)
|
||||
(if (null? part)
|
||||
(newline port)
|
||||
(pretty-print part port)))
|
||||
configuration)
|
||||
(pretty-print-with-comments/splice port configuration
|
||||
#:max-width 75)
|
||||
|
||||
(flush-output-port port))))
|
||||
|
||||
;;; Local Variables:
|
||||
|
|
Loading…
Reference in a new issue