From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44893) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMVDR-0002qT-V6 for guix-patches@gnu.org; Mon, 21 Oct 2019 06:47:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMVDQ-0006zW-Ob for guix-patches@gnu.org; Mon, 21 Oct 2019 06:47:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46979) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMVDQ-0006zQ-KD for guix-patches@gnu.org; Mon, 21 Oct 2019 06:47:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMVDQ-000686-Go for guix-patches@gnu.org; Mon, 21 Oct 2019 06:47:08 -0400 Subject: [bug#35394] [PATCH 3/3] system: Use locale information in grub.cfg. Resent-Message-ID: Date: Mon, 21 Oct 2019 12:46:32 +0200 From: Miguel Arruga Vivas Message-ID: <20191021124632.7d050b48@gmail.com> In-Reply-To: <20191021124035.531bed75@gmail.com> References: <20190423151702.05258473@gmail.com> <87tvehi6s6.fsf@gnu.org> <20191021124035.531bed75@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/g=pHJe/AVP+KS7UByP6eWng" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35394@debbugs.gnu.org --MP_/g=pHJe/AVP+KS7UByP6eWng Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline * gnu/bootloader/grub.scm (define-module): Add new dependency. (grub-configuration-file)[locale-config]: New variable with generated locale configuration when locale parameter has been provided. [builder]: Add locale-config. --- gnu/bootloader/grub.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) --MP_/g=pHJe/AVP+KS7UByP6eWng Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0003-system-Use-locale-information-in-grub.cfg.patch =46rom c5f4f7d0d3564731dc29f563b70a05ab83eec061 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D Date: Sat, 19 Oct 2019 13:28:48 +0200 Subject: [PATCH 3/3] system: Use locale information in grub.cfg. * gnu/bootloader/grub.scm (define-module): Add new dependency. (grub-configuration-file)[locale-config]: New variable with generated locale configuration when locale parameter has been provided. [builder]: Add locale-config. --- gnu/bootloader/grub.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index a0d068d1bd..8c3bab6fa7 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2017 Leo Famulari ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Miguel =C3=81ngel Arruga Vivas ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,6 +29,7 @@ #:use-module (gnu system uuid) #:use-module (gnu system file-systems) #:use-module (gnu system keyboard) + #:use-module (gnu system locale) #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages gtk) (guile-cairo guile-rsvg) #:autoload (gnu packages xorg) (xkeyboard-config) @@ -353,6 +355,20 @@ entries corresponding to old generations of the system= ." #:system system #:port #~port)) =20 + (define locale-config + #~(let ((locale #$(and locale + (locale-definition-source + (locale-name->definition locale))))) + (when locale + (format port "\ +# Localization configuration. +if search --file --set boot_partition /grub/grub.cfg; then + set locale_dir=3D(${boot_partition})/grub/locale +else + set locale_dir=3D/boot/grub/locale +fi +set lang=3D~a~%" locale)))) + (define keyboard-layout-config (let ((layout (bootloader-configuration-keyboard-layout config)) (grub (bootloader-package @@ -372,6 +388,7 @@ keymap ~a~%" keymap))))) # will be lost upon reconfiguration. ") #$sugar + #$locale-config #$keyboard-layout-config (format port " set default=3D~a --=20 2.23.0 --MP_/g=pHJe/AVP+KS7UByP6eWng--