about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
new file mode 100644
index 000000000000..af3e1edd6399
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv
+, fetchurl
+, substituteAll
+, appstream-glib
+, gettext
+, pkg-config
+, wrapGAppsHook
+, gtk3
+, ibus
+, libhangul
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-hangul";
+  version = "1.5.4";
+
+  src = fetchurl {
+    url = "https://github.com/choehwanjin/ibus-hangul/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1q6g2pnrn5gqn9jqnm3975v9hh60hc5gn9x3zbrdjgy0n3wpxwm9";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./fix-paths.patch;
+      libhangul = "${libhangul}/lib/libhangul.so.1";
+    })
+  ];
+
+  nativeBuildInputs = [
+    appstream-glib
+    gettext
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gtk3
+    ibus
+    libhangul
+    (python3.withPackages (pypkgs: with pypkgs; [
+      pygobject3
+      (toPythonModule ibus)
+    ]))
+  ];
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "Ibus Hangul engine";
+    homepage = "https://github.com/choehwanjin/ibus-hangul";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ ericsagnes ];
+    platforms = platforms.linux;
+  };
+}