tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
kbd: update search-paths.patch
Azure Zanculmarktum
4 years ago
6f89feae
88fbddc1
+90
-1
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
kbd
default.nix
search-paths.patch
+5
-1
pkgs/os-specific/linux/kbd/default.nix
···
29
"--disable-nls"
30
];
31
0
0
0
0
32
postPatch =
33
''
34
# Renaming keymaps with name clashes, because loadkeys just picks
···
62
nativeBuildInputs = [ autoreconfHook pkg-config flex ];
63
64
passthru.tests = {
65
-
inherit (nixosTests) keymap kbd-setfont-decompress;
66
};
67
68
meta = with lib; {
···
29
"--disable-nls"
30
];
31
32
+
patches = [
33
+
./search-paths.patch
34
+
];
35
+
36
postPatch =
37
''
38
# Renaming keymaps with name clashes, because loadkeys just picks
···
66
nativeBuildInputs = [ autoreconfHook pkg-config flex ];
67
68
passthru.tests = {
69
+
inherit (nixosTests) keymap kbd-setfont-decompress kbd-update-search-paths-patch;
70
};
71
72
meta = with lib; {
+85
pkgs/os-specific/linux/kbd/search-paths.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
Add /etc/kbd to the list of directories to search for the console
2
+
fonts, screen mappings, Unicode maps, keytable files, etc.
3
+
4
+
Without 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
+