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