0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #100213 from yanganto/hotfix-hime

hime: fix enable hime, remove hime-all package
This commit is contained in:
Mario Rodas 2020-10-16 23:51:24 -05:00 committed by GitHub
commit 2a58362f8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 42 deletions

View file

@ -252,8 +252,8 @@ i18n.inputMethod = {
<para> <para>
Hime is an extremely easy-to-use input method framework. It is lightweight, Hime is an extremely easy-to-use input method framework. It is lightweight,
stable, powerful and supports many commonly used input methods, including stable, powerful and supports many commonly used input methods, including
Cangjie, Zhuyin, Dayi, Rank, Shrimp, Greek, Japanese Anthy, Korean Pinyin, Cangjie, Zhuyin, Dayi, Rank, Shrimp, Greek, Korean Pinyin, Latin Alphabet,
Latin Alphabet, Rancang hunting birds, cool music, etc... etc...
</para> </para>
<para> <para>

View file

@ -1,23 +1,9 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with 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") { config = mkIf (config.i18n.inputMethod.enabled == "hime") {
i18n.inputMethod.package = pkgs.hime;
environment.variables = { environment.variables = {
GTK_IM_MODULE = "hime"; GTK_IM_MODULE = "hime";
QT_IM_MODULE = "hime"; QT_IM_MODULE = "hime";

View file

@ -79,6 +79,7 @@
./hardware/xpadneo.nix ./hardware/xpadneo.nix
./i18n/input-method/default.nix ./i18n/input-method/default.nix
./i18n/input-method/fcitx.nix ./i18n/input-method/fcitx.nix
./i18n/input-method/hime.nix
./i18n/input-method/ibus.nix ./i18n/input-method/ibus.nix
./i18n/input-method/nabi.nix ./i18n/input-method/nabi.nix
./i18n/input-method/uim.nix ./i18n/input-method/uim.nix

View file

@ -1,9 +1,10 @@
{ {
stdenv, fetchFromGitHub, pkgconfig, which, gtk2, gtk3, qt4, qt5, libXtst, lib, 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 { stdenv.mkDerivation {
name = "hime"; name = "hime";
version = "unstable-2020-06-27"; version = "unstable-2020-06-27";
@ -16,25 +17,18 @@ stdenv.mkDerivation {
}; };
nativeBuildInputs = [ which pkgconfig ]; nativeBuildInputs = [ which pkgconfig ];
buildInputs = [ libXtst gtk2 gtk3 qt4 qt5.qtbase ] buildInputs = [ libXtst gtk2 gtk3 qt4 qt5.qtbase ];
++ lib.optional enableChewing libchewing
++ lib.optional enableAnthy anthy;
patchPhase = '' preConfigure = "patchShebangs configure";
patchShebangs configure
'';
# The configure script already auto-detect libchewing and anthy,
# so we do not need additional flags for libchewing or anthy
configureFlags = [ "--disable-lib64" "--disable-qt5-immodule" ]; configureFlags = [ "--disable-lib64" "--disable-qt5-immodule" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "http://hime-ime.github.io/"; homepage = "http://hime-ime.github.io/";
downloadPage = "https://github.com/hime-ime/hime/downloads"; downloadPage = "https://github.com/hime-ime/hime/downloads";
description = "A useful input method engine for Asia region"; description = "A useful input method engine for Asia region";
license = licenses.gpl2Plus; license = licenses.gpl2Plus;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ yanganto ]; maintainers = with maintainers; [ yanganto ];
}; };
} }

View file

@ -1106,6 +1106,8 @@ in
google-amber = callPackage ../tools/graphics/amber { }; google-amber = callPackage ../tools/graphics/amber { };
hime = callPackage ../tools/inputmethods/hime {};
hpe-ltfs = callPackage ../tools/backup/hpe-ltfs { }; hpe-ltfs = callPackage ../tools/backup/hpe-ltfs { };
http2tcp = callPackage ../tools/networking/http2tcp { }; http2tcp = callPackage ../tools/networking/http2tcp { };
@ -5617,13 +5619,6 @@ in
nabi = callPackage ../tools/inputmethods/nabi { }; 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 { }; nahid-fonts = callPackage ../data/fonts/nahid-fonts { };
namazu = callPackage ../tools/text/namazu { }; namazu = callPackage ../tools/text/namazu { };