git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #68008 from jtojnar/ibus-fixes

ibus-engines.hangul: fix ibus-setup-hangul

commit47df740549e6bdfc3cf312b2df6ec77df0753335 authorJan Tojnar <jtojnar@gmail.com> dateTue 3 Sep 2019, 17:58 (7 years ago) parent62973ddb73406d
2 files changed+49−10
pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix+36−10 pkgs/tools/inputmethods/ibus-engines/ibus-hangul/fix-paths.patch+13
pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix+36−10
@@ -1,5 +1,13 @@
1−{ stdenv, fetchurl, intltool, pkgconfig
2−, gtk3, ibus, libhangul, python3
1+{ stdenv
2+, fetchurl
3+, substituteAll
4+, intltool
5+, pkgconfig
6+, wrapGAppsHook
7+, gtk3
8+, ibus
9+, libhangul
10+, python3
311}:
412
513stdenv.mkDerivation rec {
@@ -11,18 +19,36 @@ stdenv.mkDerivation rec {
1119 sha256 = "0gha8dfdf54rx8fv3yfikbgdg6lqq6l883lhg7q68ybvkjx9bwbs";
1220 };
1321
14− buildInputs = [ gtk3 ibus libhangul python3 ];
22+ patches = [
23+ (substituteAll {
24+ src = ./fix-paths.patch;
25+ libhangul = "${libhangul}/lib/libhangul.so.1";
26+ })
27+ ];
1528
16− nativeBuildInputs = [ intltool pkgconfig python3.pkgs.wrapPython ];
29+ nativeBuildInputs = [
30+ intltool
31+ pkgconfig
32+ python3.pkgs.wrapPython
33+ wrapGAppsHook
34+ ];
1735
18− postFixup = "wrapPythonPrograms";
36+ buildInputs = [
37+ gtk3
38+ ibus
39+ libhangul
40+ (python3.withPackages (pypkgs: with pypkgs; [
41+ pygobject3
42+ (toPythonModule ibus)
43+ ]))
44+ ];
1945
2046 meta = with stdenv.lib; {
2147 isIbusEngine = true;
22− description = "Ibus Hangul engine";
23− homepage = https://github.com/choehwanjin/ibus-hangul;
24− license = licenses.gpl2;
25− platforms = platforms.linux;
26− maintainers = with maintainers; [ ericsagnes ];
48+ description = "Ibus Hangul engine";
49+ homepage = https://github.com/choehwanjin/ibus-hangul;
50+ license = licenses.gpl2;
51+ maintainers = with maintainers; [ ericsagnes ];
52+ platforms = platforms.linux;
2753 };
2854}
pkgs/tools/inputmethods/ibus-engines/ibus-hangul/fix-paths.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/setup/main.py b/setup/main.py
2+index 8d581cd..2ac47b9 100644
3+--- a/setup/main.py
4++++ b/setup/main.py
5+@@ -37,7 +37,7 @@
6+
7+ def get_hangul_keyboard_list():
8+ from ctypes import CDLL, c_int, c_char_p
9+- libhangul = CDLL('libhangul.so.1')
10++ libhangul = CDLL('@libhangul@')
11+ libhangul.hangul_ic_get_n_keyboards.argtypes = []
12+ libhangul.hangul_ic_get_n_keyboards.restype = c_int
13+ libhangul.hangul_ic_get_keyboard_id.argtypes = [c_int]