15 # To enable the "interactive-wayland" subcommand of xkbcli. This is the
16 # wayland equivalent of `xev` on X11.
18 withWaylandTools ? stdenv.hostPlatform.isLinux,
25 stdenv.mkDerivation (finalAttrs: {
26 pname = "libxkbcommon";
30 url = with finalAttrs; "https://xkbcommon.org/download/${pname}-${version}.tar.xz";
31 hash = "sha256-ZXgvChCktFWvnGuqtwQOL1N1IMqi7CCSgFzf02hjskc=";
35 # Disable one Xvfb test as it fails for permission checks.
36 ./disable-x11com.patch
45 depsBuildBuild = [ pkg-config ];
53 ] ++ lib.optional withWaylandTools wayland-scanner;
60 ++ lib.optionals withWaylandTools [
64 nativeCheckInputs = [ python3 ];
67 "-Dxkb-config-root=${xkeyboard_config}/etc/X11/xkb"
68 "-Dxkb-config-extra-path=/etc/xkb" # default=$sysconfdir/xkb ($out/etc)
69 "-Dx-locale-root=${libX11.out}/share/X11/locale"
71 "-Denable-wayland=${lib.boolToString withWaylandTools}"
76 patchShebangs ../test/
80 tests.pkg-config = testers.hasPkgConfigModules {
81 package = finalAttrs.finalPackage;
86 description = "Library to handle keyboard descriptions";
88 libxkbcommon is a keyboard keymap compiler and support library which
89 processes a reduced subset of keymaps as defined by the XKB (X Keyboard
90 Extension) specification. It also contains a module for handling Compose
92 ''; # and a separate library for listing available keyboard layouts.
93 homepage = "https://xkbcommon.org";
94 changelog = "https://github.com/xkbcommon/libxkbcommon/blob/xkbcommon-${finalAttrs.version}/NEWS";
95 license = licenses.mit;
96 maintainers = with maintainers; [
100 mainProgram = "xkbcli";
101 platforms = with platforms; unix;