2021-03-14 10:50:12 -07:00
|
|
|
{ lib, stdenv, fetchurl, meson, ninja, pkg-config, bison, doxygen
|
2021-01-09 05:28:49 -08:00
|
|
|
, xkeyboard_config, libxcb, libxml2
|
|
|
|
, python3
|
|
|
|
, libX11
|
2021-01-25 05:52:05 -08:00
|
|
|
# To enable the "interactive-wayland" subcommand of xkbcli:
|
|
|
|
, withWaylandSupport ? false, wayland, wayland-protocols
|
2021-01-09 05:28:49 -08:00
|
|
|
}:
|
2012-12-02 03:21:02 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-04 02:51:56 -07:00
|
|
|
pname = "libxkbcommon";
|
2021-03-11 07:33:08 -08:00
|
|
|
version = "1.1.0";
|
2012-12-02 03:21:02 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-07-04 02:51:56 -07:00
|
|
|
url = "https://xkbcommon.org/download/${pname}-${version}.tar.xz";
|
2021-03-11 07:33:08 -08:00
|
|
|
sha256 = "0in2fq2x4yhyjmcn9n5n43zsawsdh12d4sm6l57934kgb75gqb21";
|
2012-12-02 03:21:02 -08:00
|
|
|
};
|
|
|
|
|
2021-01-25 05:52:05 -08:00
|
|
|
patches = [
|
|
|
|
./fix-cross-compilation.patch
|
|
|
|
];
|
|
|
|
|
2018-01-30 12:09:46 -08:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2015-10-07 12:47:56 -07:00
|
|
|
|
2021-03-14 10:50:12 -07:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config bison doxygen ]
|
2021-01-25 05:52:05 -08:00
|
|
|
++ lib.optional withWaylandSupport wayland;
|
|
|
|
buildInputs = [ xkeyboard_config libxcb libxml2 ]
|
|
|
|
++ lib.optionals withWaylandSupport [ wayland wayland-protocols ];
|
2021-01-09 05:28:49 -08:00
|
|
|
checkInputs = [ python3 ];
|
2012-12-02 03:21:02 -08:00
|
|
|
|
2018-01-30 12:09:46 -08:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dxkb-config-root=${xkeyboard_config}/etc/X11/xkb"
|
2021-01-09 05:28:49 -08:00
|
|
|
"-Dxkb-config-extra-path=/etc/xkb" # default=$sysconfdir/xkb ($out/etc)
|
2018-01-30 12:09:46 -08:00
|
|
|
"-Dx-locale-root=${libX11.out}/share/X11/locale"
|
2021-01-25 05:52:05 -08:00
|
|
|
"-Denable-wayland=${lib.boolToString withWaylandSupport}"
|
2018-01-30 12:09:46 -08:00
|
|
|
];
|
2015-09-27 08:40:52 -07:00
|
|
|
|
2021-01-09 05:28:49 -08:00
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
|
|
|
patchShebangs ../test/
|
|
|
|
'';
|
2018-04-24 20:20:18 -07:00
|
|
|
|
2021-01-21 09:00:13 -08:00
|
|
|
meta = with lib; {
|
2012-12-02 03:21:02 -08:00
|
|
|
description = "A library to handle keyboard descriptions";
|
2021-01-09 05:28:49 -08:00
|
|
|
longDescription = ''
|
|
|
|
libxkbcommon is a keyboard keymap compiler and support library which
|
|
|
|
processes a reduced subset of keymaps as defined by the XKB (X Keyboard
|
|
|
|
Extension) specification. It also contains a module for handling Compose
|
|
|
|
and dead keys.
|
|
|
|
''; # and a separate library for listing available keyboard layouts.
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://xkbcommon.org";
|
2021-01-09 05:28:49 -08:00
|
|
|
changelog = "https://github.com/xkbcommon/libxkbcommon/blob/xkbcommon-${version}/NEWS";
|
2016-05-14 21:17:52 -07:00
|
|
|
license = licenses.mit;
|
2021-01-21 09:48:51 -08:00
|
|
|
maintainers = with maintainers; [ primeos ttuegel ];
|
2016-08-02 10:50:55 -07:00
|
|
|
platforms = with platforms; unix;
|
2012-12-02 03:21:02 -08:00
|
|
|
};
|
|
|
|
}
|