1{
2 lib,
3 stdenv,
4 fetchurl,
5 gettext,
6 pkg-config,
7 wrapGAppsHook3,
8 anthy,
9 ibus,
10 glib,
11 gobject-introspection,
12 gtk3,
13 python3,
14}:
15
16stdenv.mkDerivation rec {
17 pname = "ibus-anthy";
18 version = "1.5.17";
19
20 src = fetchurl {
21 url = "https://github.com/ibus/ibus-anthy/releases/download/${version}/${pname}-${version}.tar.gz";
22 sha256 = "sha256-nh0orX2ivl4NnA6w2Pt1V/yJdwqiI3Jy3r4Ze9YavUA=";
23 };
24
25 buildInputs = [
26 anthy
27 glib
28 gtk3
29 ibus
30 (python3.withPackages (ps: [
31 ps.pygobject3
32 (ps.toPythonModule ibus)
33 ]))
34 ];
35
36 nativeBuildInputs = [
37 gettext
38 gobject-introspection
39 pkg-config
40 wrapGAppsHook3
41 ];
42
43 configureFlags = [
44 "--with-anthy-zipcode=${anthy}/share/anthy/zipcode.t"
45 ];
46
47 postFixup = ''
48 substituteInPlace $out/share/ibus/component/anthy.xml --replace \$\{exec_prefix\} $out
49 '';
50
51 meta = with lib; {
52 isIbusEngine = true;
53 description = "IBus interface to the anthy input method";
54 homepage = "https://github.com/fujiwarat/ibus-anthy";
55 license = licenses.gpl2Plus;
56 platforms = platforms.linux;
57 maintainers = with maintainers; [ ];
58 };
59}