[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
15/17: installer: Render the final configuration with (guix read-print).
From: |
guix-commits |
Subject: |
15/17: installer: Render the final configuration with (guix read-print). |
Date: |
Mon, 8 Aug 2022 05:55:11 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit cd1a98b928be9602ebf103744164ace7bfcae22c
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Aug 2 22:00:36 2022 +0200
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'.
---
gnu/installer.scm | 3 ++-
gnu/installer/steps.scm | 12 +++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 415f5a7af7..8a6e604fa5 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -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 @@
(('gnu 'installer _ ...) #t)
(('gnu 'build _ ...) #t)
(('guix 'build _ ...) #t)
+ (('guix 'read-print) #t)
(_ #f)))
(define not-config?
diff --git a/gnu/installer/steps.scm b/gnu/installer/steps.scm
index 8bc38181a7..f1d61a2bc5 100644
--- a/gnu/installer/steps.scm
+++ b/gnu/installer/steps.scm
@@ -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 @@
#: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 @@ found in RESULTS."
;; 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:
- 04/17: read-print: Add System and Home special forms., (continued)
- 04/17: read-print: Add System and Home special forms., guix-commits, 2022/08/08
- 09/17: read-print: Recognize page breaks., guix-commits, 2022/08/08
- 11/17: read-print: 'canonicalize-comment' leaves top-level comments unchanged., guix-commits, 2022/08/08
- 01/17: lint: Add '-e'., guix-commits, 2022/08/08
- 05/17: read-print: Expose comment constructor., guix-commits, 2022/08/08
- 02/17: gnu: go-gitlab.com-shackra-goimapnotify: Update to 2.3.7., guix-commits, 2022/08/08
- 07/17: style: Adjust test to not emit blank lines., guix-commits, 2022/08/08
- 08/17: read-print: Read and render vertical space., guix-commits, 2022/08/08
- 10/17: read-print: Add code to read and write sequences of expressions/blanks., guix-commits, 2022/08/08
- 12/17: style: Add '--whole-file' option., guix-commits, 2022/08/08
- 15/17: installer: Render the final configuration with (guix read-print).,
guix-commits <=
- 13/17: news: Add entry for 'guix style -f'., guix-commits, 2022/08/08
- 16/17: installer: Add comments and vertical space to the generated config., guix-commits, 2022/08/08
- 17/17: read-print: Add 'case' and 'cond' special forms., guix-commits, 2022/08/08
- 14/17: read-print: Support printing multi-line comments., guix-commits, 2022/08/08
- 06/17: read-print: Introduce <blank> parent class of <comment>., guix-commits, 2022/08/08