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