guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: installer: Restore LatGrkCyr-8x16 console font de


From: guix-commits
Subject: branch master updated: installer: Restore LatGrkCyr-8x16 console font depending on language.
Date: Thu, 06 Jul 2023 10:24:39 -0400

This is an automated email from the git hooks/post-receive script.

pelzflorian pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 961ffca1c7 installer: Restore LatGrkCyr-8x16 console font depending on 
language.
961ffca1c7 is described below

commit 961ffca1c75141cbb351d143b22b673638e9659d
Author: Denys Nykula <vegan@libre.net.ua>
AuthorDate: Sat Jul 1 23:48:11 2023 +0300

    installer: Restore LatGrkCyr-8x16 console font depending on language.
    
    Partially-Fixes: <https://issues.guix.gnu.org/64006>
    
    * gnu/installer/services.scm (system-services->configuration): When the
    LANGUAGE environment variable matches a known native console font, wrap the
    base services with modify-services, configuring console-font-service-type to
    set the native console font on every tty instead of the default console 
font.
    
    Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
---
 gnu/installer/services.scm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index d08bab47fd..4dfed78785 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2023 Denys Nykula <vegan@libre.net.ua>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@
 (define-module (gnu installer services)
   #:use-module (guix records)
   #:use-module (guix read-print)
+  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:export (system-service?
             system-service-name
@@ -159,6 +161,19 @@
          (base     (if desktop?
                        '%desktop-services
                        '%base-services))
+         (native-console-font (match (getenv "LANGUAGE")
+                                ((or "be" "bg" "el" "eo" "kk" "ky"
+                                     "mk" "mn" "ru" "sr" "tg" "uk")
+                                 "LatGrkCyr-8x16")
+                                (_ #f)))
+         (services (if native-console-font
+                       `(modify-services ,base
+                          (console-font-service-type
+                           config => (map (lambda (tty)
+                                            (cons (car tty)
+                                                  ,native-console-font))
+                                          config)))
+                       base))
          (service-heading (list (vertical-space 1)
                                 (comment (G_ "\
 ;; Below is the list of system services.  To search for available
@@ -177,7 +192,7 @@
                                     %base-packages))))
 
           ,@service-heading
-          (services ,base))
+          (services ,services))
         `(,@(if (null? packages)
                 '()
                 `(,@package-heading
@@ -199,4 +214,4 @@
                             ,(comment (G_ "\
 ;; This is the default list of services we
 ;; are appending to.\n"))
-                            ,base))))))
+                            ,services))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]