mini-calc: 3.3.3 -> 3.3.5 (#372274)
[NixPkgs.git] / pkgs / by-name / li / libxklavier / package.nix
blobaacab4527abbbfc4ffb31f3fa43d2767655ac3ee
2   lib,
3   stdenv,
4   fetchgit,
5   fetchpatch,
6   autoreconfHook,
7   pkg-config,
8   gtk-doc,
9   xkeyboard_config,
10   libxml2,
11   xorg,
12   docbook_xsl,
13   glib,
14   isocodes,
15   gobject-introspection,
16   withDoc ? (stdenv.buildPlatform == stdenv.hostPlatform),
19 stdenv.mkDerivation rec {
20   pname = "libxklavier";
21   version = "5.4";
23   src = fetchgit {
24     url = "https://gitlab.freedesktop.org/archived-projects/libxklavier.git";
25     rev = "${pname}-${version}";
26     sha256 = "1w1x5mrgly2ldiw3q2r6y620zgd89gk7n90ja46775lhaswxzv7a";
27   };
29   patches =
30     [
31       ./honor-XKB_CONFIG_ROOT.patch
32     ]
33     ++ lib.optionals stdenv.hostPlatform.isDarwin [
34       (fetchpatch {
35         url = "https://gitlab.freedesktop.org/archived-projects/libxklavier/-/commit/1387c21a788ec1ea203c8392ea1460fc29d83f70.patch";
36         sha256 = "sha256-fyWu7sVfDv/ozjhLSLCVsv+iNFawWgJqHUsQHHSkQn4=";
37       })
38     ];
40   outputs = [
41     "out"
42     "dev"
43   ] ++ lib.optionals withDoc [ "devdoc" ];
45   # TODO: enable xmodmap support, needs xmodmap DB
46   propagatedBuildInputs = with xorg; [
47     libX11
48     libXi
49     xkeyboard_config
50     libxml2
51     libICE
52     glib
53     libxkbfile
54     isocodes
55   ];
57   nativeBuildInputs = [
58     autoreconfHook
59     pkg-config
60     gtk-doc
61     docbook_xsl
62     gobject-introspection
63   ];
65   preAutoreconf = ''
66     export NOCONFIGURE=1
67     gtkdocize
68   '';
70   configureFlags = [
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"}"
75   ];
77   meta = with lib; {
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;
82   };