about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix
new file mode 100644
index 000000000000..77ec251ec881
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, intltool, pkgconfig
+, anthy, ibus, glib, gobject-introspection, gtk3, python3
+}:
+
+stdenv.mkDerivation rec {
+  name = "ibus-anthy-${version}";
+  version = "1.5.11";
+
+  meta = with stdenv.lib; {
+    isIbusEngine = true;
+    description  = "IBus interface to the anthy input method";
+    homepage     = https://github.com/fujiwarat/ibus-anthy;
+    license      = licenses.gpl2Plus;
+    platforms    = platforms.linux;
+    maintainers  = with maintainers; [ gebner ericsagnes ];
+  };
+
+  configureFlags = [ "--with-anthy-zipcode=${anthy}/share/anthy/zipcode.t" ];
+
+  buildInputs = [
+    anthy glib gobject-introspection gtk3 ibus (python3.withPackages (ps: [ps.pygobject3]))
+  ];
+
+  nativeBuildInputs = [ intltool pkgconfig python3.pkgs.wrapPython ];
+
+  postFixup = ''
+    wrapPythonPrograms
+    substituteInPlace $out/share/ibus/component/anthy.xml --replace \$\{exec_prefix\} $out
+  '';
+
+  src = fetchurl {
+    url = "https://github.com/ibus/ibus-anthy/releases/download/${version}/${name}.tar.gz";
+    sha256 = "1zwgswpibh67sgbza8kvg03v06maxc08ihkgm5hmh333sjq9d5c0";
+  };
+}