Subject: [PATCH 4/4] guix: End package descriptions with period.

From: Herman Rimm <[email-masked]>
Date: Thu, 2 May 2024 14:59:00 +0200

* guix/import/utils.scm (beautify-description): Append period to last
words which do not end with one.

Change-Id: Ia901dccadee6b4fef6c7f0176ce5871409ff6ce6
---
 guix/import/utils.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 09a01cf315..e06f06e196 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -370,6 +370,13 @@ (define* (beautify-description description #:optional (length 80))
              (cons* "This" "package"
                     (string-downcase first) rest))
             (_ words)))
+         (new-words
+           (match new-words
+             ((rest ... last)
+              (reverse (cons (if (string-suffix? "." last)
+                               last
+                               (string-append last "."))
+                             (reverse rest))))))
          (cleaned
           (string-join (map fix-word new-words))))
     ;; Use double spacing between sentences
-- 
2.41.0