1{ stdenv
2, fetchFromGitHub
3, pkg-config
4, which
5, gtk2
6, gtk3
7, qt5
8, libXtst
9, lib
10, libchewing
11, unixtools
12, anthy
13}:
14
15stdenv.mkDerivation rec {
16 pname = "hime";
17 version = "0.9.11";
18
19 src = fetchFromGitHub {
20 repo = pname;
21 owner = "hime-ime";
22 rev = "v${version}";
23 sha256 = "sha256-fCqet+foQjI+LpTQ/6Egup1GzXELlL2hgbh0dCKLwPI=";
24 };
25
26 nativeBuildInputs = [ which pkg-config unixtools.whereis ];
27 buildInputs = [ libXtst gtk2 gtk3 qt5.qtbase libchewing anthy ];
28
29 preConfigure = "patchShebangs configure";
30 configureFlags = [ "--disable-lib64" "--disable-qt5-immodule" ];
31 dontWrapQtApps = true;
32 postFixup = ''
33 hime_rpath=$(patchelf --print-rpath $out/bin/hime)
34 patchelf --set-rpath $out/lib/hime:$hime_rpath $out/bin/hime
35 '';
36
37
38 meta = with lib; {
39 homepage = "http://hime-ime.github.io/";
40 downloadPage = "https://github.com/hime-ime/hime/downloads";
41 description = "A useful input method engine for Asia region";
42 license = licenses.gpl2Plus;
43 platforms = platforms.linux;
44 maintainers = with maintainers; [ yanganto ];
45 };
46}