summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-04-05 23:37:33 +0200
committerLudovic Courtès <ludo@gnu.org>2020-04-06 00:14:13 +0200
commit2729cb406d9f3e9eb22cc660f887138134edb3a8 (patch)
treedacd0b6cd5cb8c4d0eaaa34300fb5a696b8ddf7f /gnu
parentf4783d77ed8a24633611693b091102b226004971 (diff)
system: Allow for comma-separated keyboard layouts.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>. * gnu/bootloader/grub.scm (keyboard-layout-file): Replace commas with hyphens in the first argument to 'computed-file'. * gnu/system/keyboard.scm (keyboard-layout->console-keymap): Likewise. * doc/guix.texi (Keyboard Layout): Add example.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/bootloader/grub.scm6
-rw-r--r--gnu/system/keyboard.scm7
2 files changed, 10 insertions, 3 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 28e6cb1f5f2..190b7171639 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -240,7 +240,11 @@ the 'share/X11/xkb/symbols/' directory of 'xkeyboard-config'."
240 "-i" #+(keyboard-layout->console-keymap layout) 240 "-i" #+(keyboard-layout->console-keymap layout)
241 "-o" #$output)))) 241 "-o" #$output))))
242 242
243 (computed-file (string-append "grub-keymap." (keyboard-layout-name layout)) 243 (computed-file (string-append "grub-keymap."
244 (string-map (match-lambda
245 (#\, #\-)
246 (chr chr))
247 (keyboard-layout-name layout)))
244 builder)) 248 builder))
245 249
246(define (grub-setup-io config) 250(define (grub-setup-io config)
diff --git a/gnu/system/keyboard.scm b/gnu/system/keyboard.scm
index cd3ab37b272..5bd13a44be4 100644
--- a/gnu/system/keyboard.scm
+++ b/gnu/system/keyboard.scm
@@ -1,5 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3;;; 3;;;
4;;; This file is part of GNU Guix. 4;;; This file is part of GNU Guix.
5;;; 5;;;
@@ -94,5 +94,8 @@ Layout information is taken from the XKEYBOARD-CONFIG package."
94 #$(keyboard-layout-name layout)))))) 94 #$(keyboard-layout-name layout))))))
95 95
96 (computed-file (string-append "console-keymap." 96 (computed-file (string-append "console-keymap."
97 (keyboard-layout-name layout)) 97 (string-map (match-lambda
98 (#\, #\-)
99 (chr chr))
100 (keyboard-layout-name layout)))
98 build)) 101 build))