summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/i18n/input-method/default.xml4
-rw-r--r--nixos/modules/i18n/input-method/hime.nix18
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--pkgs/tools/inputmethods/hime/default.nix28
-rw-r--r--pkgs/top-level/all-packages.nix9
5 files changed, 18 insertions, 42 deletions
diff --git a/nixos/modules/i18n/input-method/default.xml b/nixos/modules/i18n/input-method/default.xml
index e15f6669081..73911059f8a 100644
--- a/nixos/modules/i18n/input-method/default.xml
+++ b/nixos/modules/i18n/input-method/default.xml
@@ -252,8 +252,8 @@ i18n.inputMethod = {
   <para>
    Hime is an extremely easy-to-use input method framework. It is lightweight,
    stable, powerful and supports many commonly used input methods, including
-   Cangjie, Zhuyin, Dayi, Rank, Shrimp, Greek, Japanese Anthy, Korean Pinyin,
-   Latin Alphabet, Rancang hunting birds, cool music, etc...
+   Cangjie, Zhuyin, Dayi, Rank, Shrimp, Greek, Korean Pinyin, Latin Alphabet,
+   etc...
   </para>
 
   <para>
diff --git a/nixos/modules/i18n/input-method/hime.nix b/nixos/modules/i18n/input-method/hime.nix
index a1b346a0f84..8482130db3e 100644
--- a/nixos/modules/i18n/input-method/hime.nix
+++ b/nixos/modules/i18n/input-method/hime.nix
@@ -1,23 +1,9 @@
-{ config, pkgs, ... }:
+{ config, pkgs, lib, ... }:
 
 with lib;
 {
-  options = {
-    i18n.inputMethod.hime = {
-      enableChewing = mkOption {
-        type    =  with types; nullOr bool;
-        default = null;
-        description = "enable chewing input method";
-      };
-      enableAnthy = mkOption {
-        type    =  with types; nullOr bool;
-        default = null;
-        description = "enable anthy input method";
-      };
-    };
-  };
-
   config = mkIf (config.i18n.inputMethod.enabled == "hime") {
+    i18n.inputMethod.package = pkgs.hime;
     environment.variables = {
       GTK_IM_MODULE = "hime";
       QT_IM_MODULE  = "hime";
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 39f28773eab..0958e561243 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -79,6 +79,7 @@
   ./hardware/xpadneo.nix
   ./i18n/input-method/default.nix
   ./i18n/input-method/fcitx.nix
+  ./i18n/input-method/hime.nix
   ./i18n/input-method/ibus.nix
   ./i18n/input-method/nabi.nix
   ./i18n/input-method/uim.nix
diff --git a/pkgs/tools/inputmethods/hime/default.nix b/pkgs/tools/inputmethods/hime/default.nix
index cce1ec49515..4d2b44456ae 100644
--- a/pkgs/tools/inputmethods/hime/default.nix
+++ b/pkgs/tools/inputmethods/hime/default.nix
@@ -1,9 +1,10 @@
 {
 stdenv, fetchFromGitHub, pkgconfig, which, gtk2, gtk3, qt4, qt5, libXtst, lib,
-enableChewing ? true, libchewing,
-enableAnthy ? true, anthy,
 }:
 
+# chewing and anthy do not work well
+# so we do not enable these input method at this moment
+
 stdenv.mkDerivation {
   name = "hime";
   version = "unstable-2020-06-27";
@@ -16,25 +17,18 @@ stdenv.mkDerivation {
   };
 
   nativeBuildInputs = [ which pkgconfig ];
-  buildInputs = [ libXtst gtk2 gtk3 qt4 qt5.qtbase ]
-    ++ lib.optional enableChewing libchewing
-    ++ lib.optional enableAnthy anthy;
-
-  patchPhase = ''
-    patchShebangs configure
-  '';
+  buildInputs = [ libXtst gtk2 gtk3 qt4 qt5.qtbase ];
 
-  # The configure script already auto-detect libchewing and anthy,
-  # so we do not need additional flags for libchewing or anthy
+  preConfigure = "patchShebangs configure";
   configureFlags = [ "--disable-lib64" "--disable-qt5-immodule" ];
 
 
   meta = with stdenv.lib; {
-    homepage      = "http://hime-ime.github.io/";
-    downloadPage  = "https://github.com/hime-ime/hime/downloads";
-    description   = "A useful input method engine for Asia region";
-    license       = licenses.gpl2Plus;
-    platforms     = platforms.linux;
-    maintainers   = with maintainers; [ yanganto ];
+    homepage = "http://hime-ime.github.io/";
+    downloadPage = "https://github.com/hime-ime/hime/downloads";
+    description = "A useful input method engine for Asia region";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ yanganto ];
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 97b0a366867..20d1ecf2edb 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1104,6 +1104,8 @@ in
 
   google-amber = callPackage ../tools/graphics/amber { };
 
+  hime = callPackage ../tools/inputmethods/hime {};
+
   hpe-ltfs = callPackage ../tools/backup/hpe-ltfs { };
 
   http2tcp = callPackage ../tools/networking/http2tcp { };
@@ -5595,13 +5597,6 @@ in
 
   nabi = callPackage ../tools/inputmethods/nabi { };
 
-  hime = callPackage ../tools/inputmethods/hime {};
-
-  hime-all = callPackage ../tools/inputmethods/hime {
-    enableChewing = true;
-    enableAnthy = true;
-  };
-
   nahid-fonts = callPackage ../data/fonts/nahid-fonts { };
 
   namazu = callPackage ../tools/text/namazu { };