Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1Add /etc/kbd to the list of directories to search for the console 2fonts, screen mappings, Unicode maps, keytable files, etc. 3 4Without this patch, kbd will only look inside 5/nix/store/<hash>-kbd-x.x.x/share. 6 7--- a/src/libkeymap/analyze.l 8+++ b/src/libkeymap/analyze.l 9@@ -109,6 +109,9 @@ static const char *const include_dirpath1[] = { 10 NULL 11 }; 12 static const char *const include_dirpath3[] = { 13+ "/etc/kbd/" KEYMAPDIR "/include/", 14+ "/etc/kbd/" KEYMAPDIR "/i386/include/", 15+ "/etc/kbd/" KEYMAPDIR "/mac/include/", 16 DATADIR "/" KEYMAPDIR "/include/", 17 DATADIR "/" KEYMAPDIR "/i386/include/", 18 DATADIR "/" KEYMAPDIR "/mac/include/", 19--- a/src/libkfont/context.c 20+++ b/src/libkfont/context.c 21@@ -13,6 +13,7 @@ 22 /* search for the map file in these directories (with trailing /) */ 23 static const char *const mapdirpath[] = { 24 "", 25+ "/etc/kbd/" TRANSDIR "/", 26 DATADIR "/" TRANSDIR "/", 27 NULL 28 }; 29@@ -28,6 +29,7 @@ static const char *const mapsuffixes[] = { 30 /* search for the font in these directories (with trailing /) */ 31 static const char *const fontdirpath[] = { 32 "", 33+ "/etc/kbd/" FONTDIR "/", 34 DATADIR "/" FONTDIR "/", 35 NULL 36 }; 37@@ -42,6 +44,7 @@ static char const *const fontsuffixes[] = { 38 39 static const char *const unidirpath[] = { 40 "", 41+ "/etc/kbd/" UNIMAPDIR "/", 42 DATADIR "/" UNIMAPDIR "/", 43 NULL 44 }; 45@@ -55,6 +58,7 @@ static const char *const unisuffixes[] = { 46 /* hide partial fonts a bit - loading a single one is a bad idea */ 47 const char *const partfontdirpath[] = { 48 "", 49+ "/etc/kbd/" FONTDIR "/" PARTIALDIR "/", 50 DATADIR "/" FONTDIR "/" PARTIALDIR "/", 51 NULL 52 }; 53--- a/src/loadkeys.c 54+++ b/src/loadkeys.c 55@@ -27,6 +27,7 @@ 56 57 static const char *const dirpath1[] = { 58 "", 59+ "/etc/kbd/" KEYMAPDIR "/**", 60 DATADIR "/" KEYMAPDIR "/**", 61 KERNDIR "/", 62 NULL 63--- a/src/resizecons.c 64+++ b/src/resizecons.c 65@@ -104,6 +104,7 @@ static void vga_set_verticaldisplayend_lowbyte(int); 66 67 const char *const dirpath[] = { 68 "", 69+ "/etc/kbd/" VIDEOMODEDIR "/", 70 DATADIR "/" VIDEOMODEDIR "/", 71 NULL 72 }; 73--- a/src/setfont.c 74+++ b/src/setfont.c 75@@ -48,8 +48,8 @@ usage(void) 76 " -v Be verbose.\n" 77 " -C <cons> Indicate console device to be used.\n" 78 " -V Print version and exit.\n" 79- "Files are loaded from the current directory or %s/*/.\n"), 80- DATADIR); 81+ "Files are loaded from the current directory or %s/*/ or %s/*/.\n"), 82+ DATADIR, "/etc/kbd"); 83 exit(EX_USAGE); 84 } 85