14 # To enable the "interactive-wayland" subcommand of xkbcli. This is the
15 # wayland equivalent of `xev` on X11.
16 , withWaylandTools ? stdenv.isLinux
22 stdenv.mkDerivation rec {
23 pname = "libxkbcommon";
27 url = "https://xkbcommon.org/download/${pname}-${version}.tar.xz";
28 sha256 = "0fbb2dyjvf71p42y2jmwdcylsvj03w52f5rb23c2d00rwahhfg4l";
31 outputs = [ "out" "dev" "doc" ];
33 depsBuildBuild = [ pkg-config ];
34 nativeBuildInputs = [ meson ninja pkg-config bison doxygen ]
35 ++ lib.optional withWaylandTools wayland-scanner;
36 buildInputs = [ xkeyboard_config libxcb libxml2 ]
37 ++ lib.optionals withWaylandTools [ wayland wayland-protocols ];
38 checkInputs = [ python3 ];
41 "-Dxkb-config-root=${xkeyboard_config}/etc/X11/xkb"
42 "-Dxkb-config-extra-path=/etc/xkb" # default=$sysconfdir/xkb ($out/etc)
43 "-Dx-locale-root=${libX11.out}/share/X11/locale"
44 "-Denable-wayland=${lib.boolToString withWaylandTools}"
49 patchShebangs ../test/
53 description = "A library to handle keyboard descriptions";
55 libxkbcommon is a keyboard keymap compiler and support library which
56 processes a reduced subset of keymaps as defined by the XKB (X Keyboard
57 Extension) specification. It also contains a module for handling Compose
59 ''; # and a separate library for listing available keyboard layouts.
60 homepage = "https://xkbcommon.org";
61 changelog = "https://github.com/xkbcommon/libxkbcommon/blob/xkbcommon-${version}/NEWS";
62 license = licenses.mit;
63 maintainers = with maintainers; [ primeos ttuegel ];
64 mainProgram = "xkbcli";
65 platforms = with platforms; unix;