about summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix
blob: 4bdee391880b0a425e8072c780f854ff63938a42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ stdenv, fetchFromGitHub, makeWrapper, ibus, anthy, intltool, pkgconfig, glib, gobjectIntrospection,
  python, pythonPackages, gtk3, libtool, automake, autoconf }:

stdenv.mkDerivation rec {
  name = "ibus-anthy-${version}";
  version = "1.5.8";

  meta = with stdenv.lib; {
    description = "IBus interface to the anthy input method";
    homepage    = http://wiki.github.com/fujiwarat/ibus-anthy;
    license     = licenses.gpl2Plus;
    platforms   = platforms.linux;
    maintainers = with maintainers; [ gebner ericsagnes ];
  };

  preConfigure = "./autogen.sh --prefix=$out";

  configureFlags = "--with-anthy-zipcode=${anthy}/share/anthy/zipcode.t";

  buildInputs = [ makeWrapper ibus anthy intltool pkgconfig glib gobjectIntrospection
    python pythonPackages.pygobject3 gtk3 libtool automake autoconf ];

  postFixup = ''
    substituteInPlace $out/share/ibus/component/anthy.xml --replace \$\{exec_prefix\} $out
    for file in "$out"/libexec/*; do
      wrapProgram "$file" \
        --prefix PYTHONPATH : $PYTHONPATH \
        --prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH:$out/lib/girepository-1.0
    done
  '';

  src = fetchFromGitHub {
    owner  = "ibus";
    repo   = "ibus-anthy";
    rev    = version;
    sha256 = "1laxwpnhgihv4dz5cgcz6d0a0880r93n7039ciz1m53hdzapwi4a";
  };
}