2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, gtk-doc, xkeyboard_config, libxml2, xorg, docbook_xsl
|
2021-12-06 16:07:01 +00:00
|
|
|
, glib, isocodes, gobject-introspection
|
|
|
|
, withDoc ? (stdenv.buildPlatform == stdenv.hostPlatform)
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libxklavier";
|
2021-07-18 21:22:44 +00:00
|
|
|
version = "5.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
2021-09-18 10:52:07 +00:00
|
|
|
url = "https://gitlab.freedesktop.org/archived-projects/libxklavier.git";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "1w1x5mrgly2ldiw3q2r6y620zgd89gk7n90ja46775lhaswxzv7a";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./honor-XKB_CONFIG_ROOT.patch ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
outputs = [ "out" "dev" ] ++ lib.optionals withDoc [ "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# TODO: enable xmodmap support, needs xmodmap DB
|
|
|
|
propagatedBuildInputs = with xorg; [ libX11 libXi xkeyboard_config libxml2 libICE glib libxkbfile isocodes ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config gtk-doc docbook_xsl gobject-introspection ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
export NOCONFIGURE=1
|
|
|
|
gtkdocize
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-xkb-base=${xkeyboard_config}/etc/X11/xkb"
|
|
|
|
"--with-xkb-bin-base=${xorg.xkbcomp}/bin"
|
|
|
|
"--disable-xmodmap-support"
|
2021-12-06 16:07:01 +00:00
|
|
|
"${if withDoc then "--enable-gtk-doc" else "--disable-gtk-doc"}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library providing high-level API for X Keyboard Extension known as XKB";
|
|
|
|
homepage = "http://freedesktop.org/wiki/Software/LibXklavier";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|