lol
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 perl,
6 xkeyboard_config,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "ckbcomp";
11 version = "1.242";
12
13 src = fetchFromGitLab {
14 domain = "salsa.debian.org";
15 owner = "installer-team";
16 repo = "console-setup";
17 rev = version;
18 sha256 = "sha256-5PV1Mbg7ZGQsotwnBVz8DI77Y8ULCnoTANqBLlP3YrE=";
19 };
20
21 buildInputs = [ perl ];
22
23 patchPhase = ''
24 substituteInPlace Keyboard/ckbcomp --replace "/usr/share/X11/xkb" "${xkeyboard_config}/share/X11/xkb"
25 substituteInPlace Keyboard/ckbcomp --replace "rules = 'xorg'" "rules = 'base'"
26 '';
27
28 dontBuild = true;
29
30 installPhase = ''
31 install -Dm0555 -t $out/bin Keyboard/ckbcomp
32 install -Dm0444 -t $out/share/man/man1 man/ckbcomp.1
33 '';
34
35 meta = with lib; {
36 description = "Compiles a XKB keyboard description to a keymap suitable for loadkeys";
37 homepage = "https://salsa.debian.org/installer-team/console-setup";
38 license = licenses.gpl2Plus;
39 maintainers = with lib.maintainers; [ dezgeg ];
40 platforms = platforms.unix;
41 mainProgram = "ckbcomp";
42 };
43}