15 gobject-introspection,
16 withDoc ? (stdenv.buildPlatform == stdenv.hostPlatform),
19 stdenv.mkDerivation rec {
20 pname = "libxklavier";
24 url = "https://gitlab.freedesktop.org/archived-projects/libxklavier.git";
25 rev = "${pname}-${version}";
26 sha256 = "1w1x5mrgly2ldiw3q2r6y620zgd89gk7n90ja46775lhaswxzv7a";
31 ./honor-XKB_CONFIG_ROOT.patch
33 ++ lib.optionals stdenv.hostPlatform.isDarwin [
35 url = "https://gitlab.freedesktop.org/archived-projects/libxklavier/-/commit/1387c21a788ec1ea203c8392ea1460fc29d83f70.patch";
36 sha256 = "sha256-fyWu7sVfDv/ozjhLSLCVsv+iNFawWgJqHUsQHHSkQn4=";
43 ] ++ lib.optionals withDoc [ "devdoc" ];
45 # TODO: enable xmodmap support, needs xmodmap DB
46 propagatedBuildInputs = with xorg; [
71 "--with-xkb-base=${xkeyboard_config}/etc/X11/xkb"
72 "--with-xkb-bin-base=${xorg.xkbcomp}/bin"
73 "--disable-xmodmap-support"
74 "${if withDoc then "--enable-gtk-doc" else "--disable-gtk-doc"}"
78 description = "Library providing high-level API for X Keyboard Extension known as XKB";
79 homepage = "http://freedesktop.org/wiki/Software/LibXklavier";
80 license = licenses.lgpl2Plus;
81 platforms = platforms.unix;