summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kbd
diff options
context:
space:
mode:
authorErlend Pedersen <erlendpe@online.no>2018-10-09 01:21:28 +0200
committerJörg Thalheim <joerg@thalheim.io>2018-10-09 08:17:05 +0100
commitf1987fb58f57828944ca822bbb39b3de87f01863 (patch)
tree1cbe06763f09f1a200a3f6685800916d5e4f1d8a /pkgs/os-specific/linux/kbd
parentc2e6ca501e3eb2d9ee24367f4ba5dda81699649c (diff)
downloadnixpkgs-f1987fb58f57828944ca822bbb39b3de87f01863.tar
nixpkgs-f1987fb58f57828944ca822bbb39b3de87f01863.tar.gz
nixpkgs-f1987fb58f57828944ca822bbb39b3de87f01863.tar.bz2
nixpkgs-f1987fb58f57828944ca822bbb39b3de87f01863.tar.lz
nixpkgs-f1987fb58f57828944ca822bbb39b3de87f01863.tar.xz
nixpkgs-f1987fb58f57828944ca822bbb39b3de87f01863.tar.zst
nixpkgs-f1987fb58f57828944ca822bbb39b3de87f01863.zip
kbd: Rename some keymaps.
From upstream kbd, some keymap names are reused across very different
keyboard layouts. This is a a problem because loadkeys just picks the
first keymap it sees. The clashing names lead to e.g.  "loadkeys no"
defaulting to a norwegian dvorak map instead of the much more common
qwerty one.

Used Arch Linux's list of keymaps that need renaming, with a small
deviation: the norwegian dvorak map becomes dvorak-no instead of
no-dvorak, to match the naming scheme for all the other dvorak maps.

fixes #47878
Diffstat (limited to 'pkgs/os-specific/linux/kbd')
-rw-r--r--pkgs/os-specific/linux/kbd/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kbd/default.nix b/pkgs/os-specific/linux/kbd/default.nix
index bfade509fca..a37e65f8cb5 100644
--- a/pkgs/os-specific/linux/kbd/default.nix
+++ b/pkgs/os-specific/linux/kbd/default.nix
@@ -25,6 +25,19 @@ stdenv.mkDerivation rec {
       # Add Neo keymap subdirectory
       sed -i -e 's,^KEYMAPSUBDIRS *= *,&i386/neo ,' data/Makefile.am
 
+      # Renaming keymaps with name clashes, because loadkeys just picks
+      # the first keymap it sees. The clashing names lead to e.g.
+      # "loadkeys no" defaulting to a norwegian dvorak map instead of
+      # the much more common qwerty one.
+      pushd data/keymaps/i386
+      mv qwertz/cz{,-qwertz}.map
+      mv olpc/es{,-olpc}.map
+      mv olpc/pt{,-olpc}.map
+      mv dvorak/{no.map,dvorak-no.map}
+      mv fgGIod/trf{,-fgGIod}.map
+      mv colemak/{en-latin9,colemak}.map
+      popd
+
       # Fix the path to gzip/bzip2.
       substituteInPlace src/libkeymap/findfile.c \
         --replace gzip ${gzip}/bin/gzip \