summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix')
-rw-r--r--pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix46
1 files changed, 36 insertions, 10 deletions
diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
index 3b8b3489a1d..0a38ccfa3bd 100644
--- a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
+++ b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
@@ -1,5 +1,13 @@
-{ stdenv, fetchurl, intltool, pkgconfig
-, gtk3, ibus, libhangul, python3
+{ stdenv
+, fetchurl
+, substituteAll
+, intltool
+, pkgconfig
+, wrapGAppsHook
+, gtk3
+, ibus
+, libhangul
+, python3
 }:
 
 stdenv.mkDerivation rec {
@@ -11,18 +19,36 @@ stdenv.mkDerivation rec {
     sha256 = "0gha8dfdf54rx8fv3yfikbgdg6lqq6l883lhg7q68ybvkjx9bwbs";
   };
 
-  buildInputs = [ gtk3 ibus libhangul python3 ];
+  patches = [
+    (substituteAll {
+      src = ./fix-paths.patch;
+      libhangul = "${libhangul}/lib/libhangul.so.1";
+    })
+  ];
 
-  nativeBuildInputs = [ intltool pkgconfig python3.pkgs.wrapPython ];
+  nativeBuildInputs = [
+    intltool
+    pkgconfig
+    python3.pkgs.wrapPython
+    wrapGAppsHook
+  ];
 
-  postFixup = "wrapPythonPrograms";
+  buildInputs = [
+    gtk3
+    ibus
+    libhangul
+    (python3.withPackages (pypkgs: with pypkgs; [
+      pygobject3
+      (toPythonModule ibus)
+    ]))
+  ];
 
   meta = with stdenv.lib; {
     isIbusEngine = true;
-    description  = "Ibus Hangul engine";
-    homepage     = https://github.com/choehwanjin/ibus-hangul;
-    license      = licenses.gpl2;
-    platforms    = platforms.linux;
-    maintainers  = with maintainers; [ ericsagnes ];
+    description = "Ibus Hangul engine";
+    homepage = https://github.com/choehwanjin/ibus-hangul;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ ericsagnes ];
+    platforms = platforms.linux;
   };
 }