From 81aab64b7f6c07ae463d4b71f0e495388773f6cf Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 25 Nov 2015 15:25:29 +0900 Subject: [PATCH 01/21] fcitx: group engines --- .../fcitx-anthy.nix => fcitx-engines/fcitx-anthy/default.nix} | 0 pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/tools/inputmethods/{fcitx/fcitx-anthy.nix => fcitx-engines/fcitx-anthy/default.nix} (100%) diff --git a/pkgs/tools/inputmethods/fcitx/fcitx-anthy.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix similarity index 100% rename from pkgs/tools/inputmethods/fcitx/fcitx-anthy.nix rename to pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0a411a7ff0e..2ca59361b41 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1511,7 +1511,7 @@ let fcitx = callPackage ../tools/inputmethods/fcitx { }; - fcitx-anthy = callPackage ../tools/inputmethods/fcitx/fcitx-anthy.nix { }; + fcitx-anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { }; fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { }; From e2a62868d912dcfeae39716c988b671d2d8bd263 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 25 Nov 2015 15:27:25 +0900 Subject: [PATCH 02/21] fcitx-anthy: 0.2.1 -> 0.2.2 --- .../fcitx-engines/fcitx-anthy/default.nix | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix index 2099220f2a1..c1cb76d3a68 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix @@ -1,24 +1,26 @@ -{ stdenv, fetchurl, cmake, fcitx, anthy }: +{ stdenv, fetchurl, cmake, fcitx, anthy, gettext, pkgconfig }: stdenv.mkDerivation rec { - name = "fcitx-anthy-0.2.1"; - - meta = with stdenv.lib; { - description = "Fcitx Wrapper for anthy"; - license = licenses.gpl2Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ iyzsong ]; - }; + name = "fcitx-anthy-${version}"; + version = "0.2.2"; src = fetchurl { url = "http://download.fcitx-im.org/fcitx-anthy/${name}.tar.xz"; - sha256 = "13fpfhhxkzbq53h10i3hifa37nngm47jq361i70z22bgcrs8887x"; + sha256 = "0ayrzfx95670k86y19bzl6i6w98haaln3x8dxpb39a5dwgz59pf8"; }; - buildInputs = [ cmake fcitx anthy ]; + buildInputs = [ cmake fcitx anthy gettext pkgconfig ]; preInstall = '' substituteInPlace src/cmake_install.cmake \ --replace ${fcitx} $out ''; + + meta = with stdenv.lib; { + description = "Fcitx Wrapper for anthy"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ iyzsong ericsagnes ]; + }; + } From 3068f632c7aeec4065c19439e3c2f326a946a79d Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 25 Nov 2015 15:31:28 +0900 Subject: [PATCH 03/21] fcitx-chewing: init at 0.2.2 --- .../fcitx-engines/fcitx-chewing/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix new file mode 100644 index 00000000000..eb8897b9d5e --- /dev/null +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, cmake, fcitx, gettext, libchewing, pkgconfig }: + +stdenv.mkDerivation rec { + name = "fcitx-chewing-${version}"; + version = "0.2.2"; + + src = fetchurl { + url = "http://download.fcitx-im.org/fcitx-chewing/${name}.tar.xz"; + sha256 = "0l548xdx2fvjya1ixp37pn382yak0m4kwfh9lgh7l3y2sblqw9zs"; + }; + + buildInputs = [ cmake fcitx gettext libchewing pkgconfig ]; + + preInstall = '' + substituteInPlace src/cmake_install.cmake \ + --replace ${fcitx} $out + substituteInPlace data/cmake_install.cmake \ + --replace ${fcitx} $out + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/fcitx/fcitx-chewing"; + downloadPage = "http://download.fcitx-im.org/fcitx-chewing/"; + description = "Fcitx engine for chewing"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ca59361b41..220cfdfd659 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1513,6 +1513,8 @@ let fcitx-anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { }; + fcitx-chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { }; + fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { }; fcitx-with-plugins = callPackage ../tools/inputmethods/fcitx/wrapper.nix { From 1e5cd17f12a520e7f670d206a910e27f50a948d2 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 25 Nov 2015 15:34:54 +0900 Subject: [PATCH 04/21] fcitx-hangul: init at 0.3.0 --- .../fcitx-engines/fcitx-hangul/default.nix | 29 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix new file mode 100644 index 00000000000..529bb29f98c --- /dev/null +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, cmake, fcitx, libhangul, gettext, pkgconfig }: + +stdenv.mkDerivation rec { + name = "fcitx-hangul-${version}"; + version = "0.3.0"; + + src = fetchurl { + url = "http://download.fcitx-im.org/fcitx-hangul/${name}.tar.xz"; + sha256 = "1jq78nczliw6pnhfac8hspffybrry6syk17y0wwcq05j3r3nd2lp"; + }; + + buildInputs = [ cmake fcitx libhangul gettext pkgconfig ]; + + preInstall = '' + substituteInPlace src/cmake_install.cmake \ + --replace ${fcitx} $out + substituteInPlace data/cmake_install.cmake \ + --replace ${fcitx} $out + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/fcitx/fcitx-hangul"; + downloadPage = "http://download.fcitx-im.org/fcitx-hangul/"; + description = "Fcitx Wrapper for hangul"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 220cfdfd659..61347ecab52 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1515,6 +1515,8 @@ let fcitx-chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { }; + fcitx-hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; + fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { }; fcitx-with-plugins = callPackage ../tools/inputmethods/fcitx/wrapper.nix { From eb31d296e6d4003eebf6aa5548c34c524eba3bcf Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 25 Nov 2015 15:40:39 +0900 Subject: [PATCH 05/21] fcitx-table-other: init at 0.2.3 --- .../fcitx-table-other/default.nix | 28 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix new file mode 100644 index 00000000000..d5e74f6ba06 --- /dev/null +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, cmake, fcitx, gettext }: + +stdenv.mkDerivation rec { + name = "fcitx-table-other-${version}"; + version = "0.2.3"; + + src = fetchurl { + url = "http://download.fcitx-im.org/fcitx-table-other/${name}.tar.xz"; + sha256 = "12fqbsjrpx5pndx2jf7fksrlp01a4yxz62h2vpxrbkpk73ljly4v"; + }; + + buildInputs = [ cmake fcitx gettext ]; + + preInstall = '' + substituteInPlace tables/cmake_install.cmake \ + --replace ${fcitx} $out + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/fcitx/fcitx-table-other"; + downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; + description = "Provides some other tables for Fcitx"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 61347ecab52..47ddbb6feda 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1517,6 +1517,8 @@ let fcitx-hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; + fcitx-table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { }; + fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { }; fcitx-with-plugins = callPackage ../tools/inputmethods/fcitx/wrapper.nix { From 1e581966b9883a66172bb6ccae3dd33f393e4dfe Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 25 Nov 2015 16:18:26 +0900 Subject: [PATCH 06/21] fcitx-moz: init at 2.17.2313.102 --- .../fcitx-engines/fcitx-mozc/default.nix | 116 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 + 2 files changed, 120 insertions(+) create mode 100644 pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix new file mode 100644 index 00000000000..7accea3f0fd --- /dev/null +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix @@ -0,0 +1,116 @@ +{ clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, fetchsvn, gyp, which, ninja, + python, pkgconfig, protobuf, gtk, zinnia, qt4, libxcb, tegaki-zinnia-japanese, + fcitx, gettext }: +let + japanese_usage_dictionary = fetchsvn { + url = "http://japanese-usage-dictionary.googlecode.com/svn/trunk"; + rev = "10"; + sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm"; + }; + icons = fetchurl { + url = "http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz"; + sha256 = "10bdjn481jsh32vll7r756l392anz44h6207vjqwby3rplk31np1"; + }; +in clangStdenv.mkDerivation rec { + name = "fcitx-mozc-${version}"; + version = "2.17.2313.102"; + + src = fetchFromGitHub { + owner = "google"; + repo = "mozc"; + rev = "3306d3314499a54a4064b8b80bbc1bce3f6cfac4"; + sha256 = "0l7mjlnbm6i1ipni8pg9ym5bjg3rzkaxi9xwmsz2lddv348sqii2"; + }; + + nativeBuildInputs = [ gyp which ninja python pkgconfig ]; + buildInputs = [ protobuf gtk zinnia qt4 libxcb fcitx gettext ]; + + postUnpack = '' + rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/ + ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary + tar -xzf ${icons} -C $sourceRoot + ''; + + patch_version = "2.17.2313.102.1"; + patches = [ + (fetchpatch rec { + name = "fcitx-mozc-${patch_version}.patch"; + url = "https://download.fcitx-im.org/fcitx-mozc/${name}"; + sha256 = "172c34jkppibvwr9qf9xwgh2hdrmmhyx7nsdj49krxbfdlsy3yy0"; + }) + ]; + + postPatch = '' + substituteInPlace src/unix/fcitx/mozc.conf \ + --replace "/usr/share/fcitx/mozc/icon/mozc.png" "mozc" + ''; + + configurePhase = '' + export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1" + python src/build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc \ + python src/unix/fcitx/fcitx.gyp gyp --gypdir=${gyp}/bin + ''; + + preBuildPhase = '' + head -n 29 src/server/mozc_server.cc > LICENSE + ''; + + buildPhase = '' + python src/build_mozc.py build -c Release \ + unix/fcitx/fcitx.gyp:fcitx-mozc \ + server/server.gyp:mozc_server \ + gui/gui.gyp:mozc_tool + ''; + + checkPhase = '' + python src/build_mozc.py runtests -c Release + ''; + + installPhase = '' + install -d $out/share/licenses/fcitx-mozc/ + install -m 644 LICENSE src/data/installer/*.html $out/share/licenses/fcitx-mozc/ + + install -d $out/share/doc/mozc + install -m 644 src/data/installer/*.html $out/share/doc/mozc/ + + install -D -m 755 src/out_linux/Release/mozc_server $out/lib/mozc/mozc_server + install -m 755 src/out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool + + install -D -m 755 src/out_linux/Release/fcitx-mozc.so $out/lib/fcitx/fcitx-mozc.so + install -D -m 644 src/unix/fcitx/fcitx-mozc.conf $out/share/fcitx/addon/fcitx-mozc.conf + install -D -m 644 src/unix/fcitx/mozc.conf $out/share/fcitx/inputmethod/mozc.conf + + install -d $out/share/doc/mozc + + for mofile in src/out_linux/Release/gen/unix/fcitx/po/*.mo + do + filename=`basename $mofile` + lang=$filename.mo + install -D -m 644 "$mofile" "$out/share/locale/$lang/LC_MESSAGES/fcitx-mozc.mo" + done + + install -d $out/share/fcitx/imicon + install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/imicon/mozc.png + install -d $out/share/fcitx/mozc/icon + install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/mozc/icon/mozc.png + install -m 644 fcitx-mozc-icons/mozc-alpha_full.png $out/share/fcitx/mozc/icon/mozc-alpha_full.png + install -m 644 fcitx-mozc-icons/mozc-alpha_half.png $out/share/fcitx/mozc/icon/mozc-alpha_half.png + install -m 644 fcitx-mozc-icons/mozc-direct.png $out/share/fcitx/mozc/icon/mozc-direct.png + install -m 644 fcitx-mozc-icons/mozc-hiragana.png $out/share/fcitx/mozc/icon/mozc-hiragana.png + install -m 644 fcitx-mozc-icons/mozc-katakana_full.png $out/share/fcitx/mozc/icon/mozc-katakana_full.png + install -m 644 fcitx-mozc-icons/mozc-katakana_half.png $out/share/fcitx/mozc/icon/mozc-katakana_half.png + install -m 644 fcitx-mozc-icons/mozc-dictionary.png $out/share/fcitx/mozc/icon/mozc-dictionary.png + install -m 644 fcitx-mozc-icons/mozc-properties.png $out/share/fcitx/mozc/icon/mozc-properties.png + install -m 644 fcitx-mozc-icons/mozc-tool.png $out/share/fcitx/mozc/icon/mozc-tool.png + ''; + + meta = with clangStdenv.lib; { + description = "Fcitx engine for Google japanese input method"; + homepage = http://code.google.com/p/mozc/; + downloadPage = "http://download.fcitx-im.org/fcitx-mozc/"; + license = licenses.free; + platforms = platforms.linux; + maintainers = [ maintainers.ericsagnes ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 47ddbb6feda..cb1d083555d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1517,6 +1517,10 @@ let fcitx-hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; + fcitx-mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { + inherit (pythonPackages) gyp; + }; + fcitx-table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { }; fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { }; From a0457135d8e4ea13610f00b26e37fcb7201ceb67 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 17 Feb 2016 02:15:15 +0900 Subject: [PATCH 07/21] fcitx-qt5: 1.0.4 -> 1.0.5 --- pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix b/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix index fad7862cf3b..428e96e8674 100644 --- a/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix +++ b/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "fcitx-qt5-${version}"; - version = "1.0.4"; + version = "1.0.5"; src = fetchurl { url = "http://download.fcitx-im.org/fcitx-qt5/${name}.tar.xz"; - sha256 = "070dlmwkim7sg0xwxfcbb46li1jk8yd3rmj0j5fkmgyr12044aml"; + sha256 = "1pj1b04n8r4kl7jh1qdv0xshgzb3zrmizfa3g5h3yk589h191vwc"; }; buildInputs = [ cmake fcitx extra-cmake-modules qtbase ]; From 850be632a071c2d7dd2f9bdb333d1fdffbec3340 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 25 Nov 2015 16:29:50 +0900 Subject: [PATCH 08/21] fcitx service: init --- nixos/modules/i18n/inputMethod/fcitx.nix | 51 +++++++++++++++++++ nixos/modules/module-list.nix | 1 + .../fcitx-engines/fcitx-anthy/default.nix | 9 ++-- .../fcitx-engines/fcitx-chewing/default.nix | 13 ++--- .../fcitx-engines/fcitx-hangul/default.nix | 13 ++--- .../fcitx-engines/fcitx-mozc/default.nix | 13 ++--- .../fcitx-table-other/default.nix | 13 ++--- pkgs/top-level/all-packages.nix | 18 ++++--- 8 files changed, 96 insertions(+), 35 deletions(-) create mode 100644 nixos/modules/i18n/inputMethod/fcitx.nix diff --git a/nixos/modules/i18n/inputMethod/fcitx.nix b/nixos/modules/i18n/inputMethod/fcitx.nix new file mode 100644 index 00000000000..16fa8c764a8 --- /dev/null +++ b/nixos/modules/i18n/inputMethod/fcitx.nix @@ -0,0 +1,51 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.i18n.inputMethod.fcitx; + fcitxPackage = pkgs.fcitx-with-plugins.override { plugins = cfg.engines; }; + fcitxEngine = types.package // { + name = "fcitx-engine"; + check = x: (lib.types.package.check x) && (attrByPath ["meta" "isFcitxEngine"] false x); + }; +in +{ + options = { + + i18n.inputMethod.fcitx = { + enable = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Enable Fcitx input method. + Fcitx can be used to input of Chinese, Korean, Japanese and other special characters. + ''; + }; + engines = mkOption { + type = with types; listOf fcitxEngine; + default = []; + example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]"; + description = '' + Enabled Fcitx engines. + Available engines can be found by running `nix-env "<nixpkgs>" . -qaP -A fcitx-engines`. + ''; + }; + }; + + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ fcitxPackage ]; + gtkPlugins = [ fcitxPackage ]; + qtPlugins = [ fcitxPackage pkgs.kde5.fcitx-qt5 ]; + + environment.variables = { + GTK_IM_MODULE = "fcitx"; + QT_IM_MODULE = "fcitx"; + XMODIFIERS = "@im=fcitx"; + }; + services.xserver.displayManager.sessionCommands = "${fcitxPackage}/bin/fcitx"; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 8254cdd6f5e..7375dcde5c5 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -43,6 +43,7 @@ ./hardware/video/nvidia.nix ./hardware/video/ati.nix ./hardware/video/webcam/facetimehd.nix + ./i18n/inputMethod/fcitx.nix ./installer/tools/auto-upgrade.nix ./installer/tools/nixos-checkout.nix ./installer/tools/tools.nix diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix index c1cb76d3a68..88ba436207c 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix @@ -17,10 +17,11 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "Fcitx Wrapper for anthy"; - license = licenses.gpl2Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ iyzsong ericsagnes ]; + isFcitxEngine = true; + description = "Fcitx Wrapper for anthy"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ iyzsong ericsagnes ]; }; } diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix index eb8897b9d5e..58695434cb6 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix @@ -19,12 +19,13 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = "https://github.com/fcitx/fcitx-chewing"; - downloadPage = "http://download.fcitx-im.org/fcitx-chewing/"; - description = "Fcitx engine for chewing"; - license = licenses.gpl2; - platforms = platforms.linux; - maintainers = with maintainers; [ ericsagnes ]; + isFcitxEngine = true; + homepage = "https://github.com/fcitx/fcitx-chewing"; + downloadPage = "http://download.fcitx-im.org/fcitx-chewing/"; + description = "Fcitx engine for chewing"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; }; } diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix index 529bb29f98c..54b5335d9bb 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix @@ -19,11 +19,12 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = "https://github.com/fcitx/fcitx-hangul"; - downloadPage = "http://download.fcitx-im.org/fcitx-hangul/"; - description = "Fcitx Wrapper for hangul"; - license = licenses.gpl2; - platforms = platforms.linux; - maintainers = with maintainers; [ ericsagnes ]; + isFcitxEngine = true; + homepage = "https://github.com/fcitx/fcitx-hangul"; + downloadPage = "http://download.fcitx-im.org/fcitx-hangul/"; + description = "Fcitx Wrapper for hangul"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; }; } diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix index 7accea3f0fd..5366fe55877 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix @@ -105,12 +105,13 @@ in clangStdenv.mkDerivation rec { ''; meta = with clangStdenv.lib; { - description = "Fcitx engine for Google japanese input method"; - homepage = http://code.google.com/p/mozc/; - downloadPage = "http://download.fcitx-im.org/fcitx-mozc/"; - license = licenses.free; - platforms = platforms.linux; - maintainers = [ maintainers.ericsagnes ]; + isFcitxEngine = true; + description = "Fcitx engine for Google japanese input method"; + homepage = http://code.google.com/p/mozc/; + downloadPage = "http://download.fcitx-im.org/fcitx-mozc/"; + license = licenses.free; + platforms = platforms.linux; + maintainers = [ maintainers.ericsagnes ]; }; } diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix index d5e74f6ba06..40ef0b33aea 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix @@ -17,12 +17,13 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = "https://github.com/fcitx/fcitx-table-other"; - downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; - description = "Provides some other tables for Fcitx"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ ericsagnes ]; + isFcitxEngine = true; + homepage = "https://github.com/fcitx/fcitx-table-other"; + downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; + description = "Provides some other tables for Fcitx"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cb1d083555d..d2e26707c45 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1511,18 +1511,22 @@ let fcitx = callPackage ../tools/inputmethods/fcitx { }; - fcitx-anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { }; + fcitx-engines = { - fcitx-chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { }; + anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { }; - fcitx-hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; + chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { }; + + hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; + + mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { + inherit (pythonPackages) gyp; + }; + + table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { }; - fcitx-mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { - inherit (pythonPackages) gyp; }; - fcitx-table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { }; - fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { }; fcitx-with-plugins = callPackage ../tools/inputmethods/fcitx/wrapper.nix { From 295d67002432bc719af447a054add3292eefafed Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 10 Feb 2016 14:00:58 +0900 Subject: [PATCH 09/21] fcitx-with-plugins: add fcitx-configtool and fcitx-qt5 --- nixos/modules/i18n/inputMethod/fcitx.nix | 2 +- pkgs/tools/inputmethods/fcitx/wrapper.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/i18n/inputMethod/fcitx.nix b/nixos/modules/i18n/inputMethod/fcitx.nix index 16fa8c764a8..b0e7578810a 100644 --- a/nixos/modules/i18n/inputMethod/fcitx.nix +++ b/nixos/modules/i18n/inputMethod/fcitx.nix @@ -39,7 +39,7 @@ in config = mkIf cfg.enable { environment.systemPackages = [ fcitxPackage ]; gtkPlugins = [ fcitxPackage ]; - qtPlugins = [ fcitxPackage pkgs.kde5.fcitx-qt5 ]; + qtPlugins = [ fcitxPackage ]; environment.variables = { GTK_IM_MODULE = "fcitx"; diff --git a/pkgs/tools/inputmethods/fcitx/wrapper.nix b/pkgs/tools/inputmethods/fcitx/wrapper.nix index d4efb332696..a0ae2618954 100644 --- a/pkgs/tools/inputmethods/fcitx/wrapper.nix +++ b/pkgs/tools/inputmethods/fcitx/wrapper.nix @@ -1,4 +1,4 @@ -{ stdenv, buildEnv, fcitx, makeWrapper, plugins }: +{ stdenv, buildEnv, fcitx, fcitx-configtool, makeWrapper, plugins, kde5 }: # This is based on the pidgin-with-plugins package. # Users should be able to configure what plugins are used @@ -16,7 +16,7 @@ let drv = buildEnv { name = "fcitx-with-plugins-" + (builtins.parseDrvName fcitx.name).version; - paths = [ fcitx ] ++ plugins; + paths = [ fcitx fcitx-configtool kde5.fcitx-qt5 ] ++ plugins; postBuild = '' # TODO: This could be avoided if buildEnv could be forced to create all directories From 3c9892d4d4a1049071629a269e0c7ce7a0eb0a4b Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 10 Feb 2016 11:41:51 +0900 Subject: [PATCH 10/21] ibus: group engines --- .../{ => ibus-engines}/ibus-anthy/default.nix | 0 .../ibus-mozc}/default.nix | 0 .../ibus-table-others/default.nix | 0 .../{ => ibus-engines}/ibus-table/default.nix | 0 .../{ibus-qt/default.nix => ibus/ibus-qt.nix} | 0 pkgs/top-level/all-packages.nix | 20 +++++++++++-------- 6 files changed, 12 insertions(+), 8 deletions(-) rename pkgs/tools/inputmethods/{ => ibus-engines}/ibus-anthy/default.nix (100%) rename pkgs/tools/inputmethods/{mozc => ibus-engines/ibus-mozc}/default.nix (100%) rename pkgs/tools/inputmethods/{ => ibus-engines}/ibus-table-others/default.nix (100%) rename pkgs/tools/inputmethods/{ => ibus-engines}/ibus-table/default.nix (100%) rename pkgs/tools/inputmethods/{ibus-qt/default.nix => ibus/ibus-qt.nix} (100%) diff --git a/pkgs/tools/inputmethods/ibus-anthy/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix similarity index 100% rename from pkgs/tools/inputmethods/ibus-anthy/default.nix rename to pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix diff --git a/pkgs/tools/inputmethods/mozc/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix similarity index 100% rename from pkgs/tools/inputmethods/mozc/default.nix rename to pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix diff --git a/pkgs/tools/inputmethods/ibus-table-others/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix similarity index 100% rename from pkgs/tools/inputmethods/ibus-table-others/default.nix rename to pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix diff --git a/pkgs/tools/inputmethods/ibus-table/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix similarity index 100% rename from pkgs/tools/inputmethods/ibus-table/default.nix rename to pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix diff --git a/pkgs/tools/inputmethods/ibus-qt/default.nix b/pkgs/tools/inputmethods/ibus/ibus-qt.nix similarity index 100% rename from pkgs/tools/inputmethods/ibus-qt/default.nix rename to pkgs/tools/inputmethods/ibus/ibus-qt.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d2e26707c45..f6eac612375 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1170,19 +1170,23 @@ let m17n_lib = callPackage ../tools/inputmethods/m17n-lib { }; - mozc = callPackage ../tools/inputmethods/mozc { - inherit (pythonPackages) gyp; - }; - ibus = callPackage ../tools/inputmethods/ibus { }; - ibus-qt = callPackage ../tools/inputmethods/ibus-qt { }; + ibus-qt = callPackage ../tools/inputmethods/ibus/ibus-qt.nix { }; - ibus-anthy = callPackage ../tools/inputmethods/ibus-anthy { }; + ibus-engines = { - ibus-table = callPackage ../tools/inputmethods/ibus-table { }; + anthy = callPackage ../tools/inputmethods/ibus-engines/ibus-anthy { }; - ibus-table-others = callPackage ../tools/inputmethods/ibus-table-others { }; + mozc = callPackage ../tools/inputmethods/ibus-engines/mozc { + inherit (pythonPackages) gyp; + }; + + table = callPackage ../tools/inputmethods/ibus-engines/ibus-table { }; + + table-others = callPackage ../tools/inputmethods/ibus-engines/ibus-table-others { }; + + }; brotli = callPackage ../tools/compression/brotli { }; From dd579a557694fcf15e705475539c4d9978e18e8d Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 10 Feb 2016 13:15:26 +0900 Subject: [PATCH 11/21] ibus-anthy: 1.5.7 -> 1.5.8 --- .../ibus-engines/ibus-anthy/default.nix | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix index 0b2382315a5..4bdee391880 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix @@ -1,20 +1,24 @@ -{ stdenv, fetchurl, makeWrapper, ibus, anthy, intltool, pkgconfig, glib, gobjectIntrospection, python, pythonPackages }: +{ stdenv, fetchFromGitHub, makeWrapper, ibus, anthy, intltool, pkgconfig, glib, gobjectIntrospection, + python, pythonPackages, gtk3, libtool, automake, autoconf }: stdenv.mkDerivation rec { name = "ibus-anthy-${version}"; - version = "1.5.7"; + version = "1.5.8"; meta = with stdenv.lib; { description = "IBus interface to the anthy input method"; homepage = http://wiki.github.com/fujiwarat/ibus-anthy; license = licenses.gpl2Plus; platforms = platforms.linux; - maintainers = with maintainers; [ gebner ]; + maintainers = with maintainers; [ gebner ericsagnes ]; }; + preConfigure = "./autogen.sh --prefix=$out"; + configureFlags = "--with-anthy-zipcode=${anthy}/share/anthy/zipcode.t"; - buildInputs = [ makeWrapper ibus anthy intltool pkgconfig glib gobjectIntrospection python pythonPackages.pygobject3 ]; + buildInputs = [ makeWrapper ibus anthy intltool pkgconfig glib gobjectIntrospection + python pythonPackages.pygobject3 gtk3 libtool automake autoconf ]; postFixup = '' substituteInPlace $out/share/ibus/component/anthy.xml --replace \$\{exec_prefix\} $out @@ -25,8 +29,10 @@ stdenv.mkDerivation rec { done ''; - src = fetchurl { - url = "https://github.com/ibus/ibus-anthy/releases/download/${version}/${name}.tar.gz"; - sha256 = "00sjrfhghrgkqm72mf39f8sz6wr4fwvvs9mn2alaldhgr5v0c861"; + src = fetchFromGitHub { + owner = "ibus"; + repo = "ibus-anthy"; + rev = version; + sha256 = "1laxwpnhgihv4dz5cgcz6d0a0880r93n7039ciz1m53hdzapwi4a"; }; } From ca2f9a4f159ed71f0495126b903b5f8b65a3cb88 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 10 Feb 2016 13:34:17 +0900 Subject: [PATCH 12/21] ibus-mozc: 2015-05-02 -> 2.17.2313.102 --- .../ibus-engines/ibus-hangul/default.nix | 38 +++++++++++++++++++ .../ibus-engines/ibus-mozc/default.nix | 30 ++++++++++----- pkgs/top-level/all-packages.nix | 4 +- 3 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix new file mode 100644 index 00000000000..5a6af4608c0 --- /dev/null +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix @@ -0,0 +1,38 @@ +{ stdenv, gnome, fetchFromGitHub, ibus, libhangul, autoconf, automake, gettext, libtool, librsvg, + intltool, pkgconfig, pythonPackages, makeWrapper, gtk3, python }: + +stdenv.mkDerivation rec { + name = "ibus-hangul-${version}"; + version = "1.5.0"; + + src = fetchFromGitHub { + owner = "choehwanjin"; + repo = "ibus-hangul"; + rev = version; + sha256 = "12l2spr32biqdbz01bzkamgq5gskbi6cd7ai343wqyy1ibjlkmp8"; + }; + + buildInputs = [ ibus libhangul autoconf gettext automake libtool + intltool pkgconfig python pythonPackages.pygobject3 gtk3 makeWrapper ]; + + preConfigure = '' + autoreconf --verbose --force --install + intltoolize --automake --force --copy + ''; + + postInstall = '' + wrapProgram $out/bin/ibus-setup-hangul \ + --prefix PYTHONPATH : $PYTHONPATH \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ + --prefix GDK_PIXBUF_MODULE_FILE : ${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \ + --prefix LD_LIBRARY_PATH : ${libhangul}/lib + ''; + + meta = with stdenv.lib; { + description = "Ibus Hangul engine."; + homepage = https://github.com/choehwanjin/ibus-hangul; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; + }; +} diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix index 20789a33a0c..9ab640990b1 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix @@ -7,33 +7,40 @@ let sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm"; }; in clangStdenv.mkDerivation rec { - name = "mozc-${version}"; - version = "2015-05-02"; + name = "ibus-mozc-${version}"; + version = "2.17.2313.102"; meta = with clangStdenv.lib; { description = "Japanese input method from Google"; homepage = http://code.google.com/p/mozc/; - license = licenses.bsd3; + license = licenses.free; platforms = platforms.linux; - maintainers = [ maintainers.gebner ]; + maintainers = with maintainers; [ gebner ericsagnes ]; }; nativeBuildInputs = [ gyp which ninja python pkgconfig ]; buildInputs = [ protobuf ibus gtk zinnia qt4 libxcb ]; src = fetchFromGitHub { - owner = "google"; - repo = "mozc"; - rev = "d9783737ecfcb68c3d98d84e7052d716f4d0e0cb"; - sha256 = "52a83658e2e4a7b38e31a4085682be24c9c5f4c51a01578598a30b9833827b72"; + owner = "google"; + repo = "mozc"; + rev = "3306d3314499a54a4064b8b80bbc1bce3f6cfac4"; + sha256 = "0l7mjlnbm6i1ipni8pg9ym5bjg3rzkaxi9xwmsz2lddv348sqii2"; }; + postUnpack = '' + rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/ ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary ''; configurePhase = '' - export GYP_DEFINES="ibus_mozc_path=$out/lib/ibus-mozc/ibus-engine-mozc ibus_mozc_icon_path=$out/share/ibus-mozc/product_icon.png document_dir=$out/share/doc/mozc zinnia_model_file=${tegaki-zinnia-japanese}/share/tegaki/models/zinnia/handwriting-ja.model use_libprotobuf=1" - python src/build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc + export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 ibus_mozc_path=$out/lib/ibus-mozc/ibus-engine-mozc" + python src/build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc \ + python src/unix/fcitx/fcitx.gyp gyp --gypdir=${gyp}/bin + ''; + + preBuildPhase = '' + head -n 29 src/server/mozc_server.cc > LICENSE ''; buildPhase = '' @@ -50,6 +57,9 @@ in clangStdenv.mkDerivation rec { ''; installPhase = '' + install -d $out/share/licenses/mozc/ + install -m 644 LICENSE src/data/installer/*.html $out/share/licenses/mozc/ + install -D -m 755 src/out_linux/Release/mozc_server $out/lib/mozc/mozc_server install -m 755 src/out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f6eac612375..5d3162c6c30 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1178,7 +1178,9 @@ let anthy = callPackage ../tools/inputmethods/ibus-engines/ibus-anthy { }; - mozc = callPackage ../tools/inputmethods/ibus-engines/mozc { + hangul = callPackage ../tools/inputmethods/ibus-engines/ibus-hangul { }; + + mozc = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc { inherit (pythonPackages) gyp; }; From 7ec5dc923435e96122f3a4ac0decd099f440f68e Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 10 Feb 2016 15:57:05 +0900 Subject: [PATCH 13/21] ibus-wrapper: init --- pkgs/tools/inputmethods/ibus/wrapper.nix | 24 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/tools/inputmethods/ibus/wrapper.nix diff --git a/pkgs/tools/inputmethods/ibus/wrapper.nix b/pkgs/tools/inputmethods/ibus/wrapper.nix new file mode 100644 index 00000000000..270a2db7412 --- /dev/null +++ b/pkgs/tools/inputmethods/ibus/wrapper.nix @@ -0,0 +1,24 @@ +{ stdenv, buildEnv, ibus, makeWrapper, plugins, hicolor_icon_theme }: + +let +drv = buildEnv { + name = "ibus-with-plugins-" + (builtins.parseDrvName ibus.name).version; + + paths = [ ibus hicolor_icon_theme ] ++ plugins; + + postBuild = '' + # TODO: This could be avoided if buildEnv could be forced to create all directories + if [ -L $out/bin ]; then + rm $out/bin + mkdir $out/bin + for i in ${ibus}/bin/*; do + ln -s $i $out/bin + done + fi + wrapProgram $out/bin/ibus \ + --set IBUS_COMPONENT_PATH "$out/share/ibus/component/" + wrapProgram $out/bin/ibus-daemon \ + --set IBUS_COMPONENT_PATH "$out/share/ibus/component/" + ''; + }; +in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5d3162c6c30..db3bc6abdc2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1190,6 +1190,10 @@ let }; + ibus-with-plugins = callPackage ../tools/inputmethods/ibus/wrapper.nix { + plugins = [ ]; + }; + brotli = callPackage ../tools/compression/brotli { }; biosdevname = callPackage ../tools/networking/biosdevname { }; From 52dd53373f7fa134b0e697a0f102490f3f4ade87 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Wed, 10 Feb 2016 16:10:35 +0900 Subject: [PATCH 14/21] ibus service: refactoring --- nixos/modules/i18n/inputMethod/ibus.nix | 52 +++++++++++++++++++ nixos/modules/module-list.nix | 2 +- nixos/modules/programs/ibus.nix | 51 ------------------ nixos/modules/rename.nix | 4 ++ .../ibus-engines/ibus-anthy/default.nix | 11 ++-- .../ibus-engines/ibus-hangul/default.nix | 11 ++-- .../ibus-engines/ibus-mozc/default.nix | 11 ++-- .../ibus-table-others/default.nix | 11 ++-- .../ibus-engines/ibus-table/default.nix | 11 ++-- 9 files changed, 87 insertions(+), 77 deletions(-) create mode 100644 nixos/modules/i18n/inputMethod/ibus.nix delete mode 100644 nixos/modules/programs/ibus.nix diff --git a/nixos/modules/i18n/inputMethod/ibus.nix b/nixos/modules/i18n/inputMethod/ibus.nix new file mode 100644 index 00000000000..e4bc15cf891 --- /dev/null +++ b/nixos/modules/i18n/inputMethod/ibus.nix @@ -0,0 +1,52 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.i18n.inputMethod.ibus; + ibusPackage = pkgs.ibus-with-plugins.override { plugins = cfg.engines; }; + ibusEngine = types.package // { + name = "ibus-engine"; + check = x: (lib.types.package.check x) && (attrByPath ["meta" "isIbusEngine"] false x); + }; +in +{ + options = { + i18n.inputMethod.ibus = { + enable = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Enable IBus input method. + IBus can be used input of Chinese, Korean, Japanese and other special characters. + ''; + }; + engines = mkOption { + type = with types; listOf ibusEngine; + default = []; + example = literalExample "with pkgs.ibus-engines; [ mozc hangul ]"; + description = '' + Enabled IBus engines. + Available engines can be found by running `nix-env "<nixpkgs>" . -qaP -A ibus-engines`. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + # Without dconf enabled it is impossible to use IBus + environment.systemPackages = [ ibusPackage pkgs.gnome3.dconf ]; + + gtkPlugins = [ pkgs.ibus ]; + qtPlugins = [ pkgs.ibus-qt ]; + + environment.variables = { + GTK_IM_MODULE = "ibus"; + QT_IM_MODULE = "ibus"; + XMODIFIERS = "@im=ibus"; + }; + + services.xserver.displayManager.sessionCommands = "${ibusPackage}/bin/ibus-daemon --daemonize --xim --cache=none"; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 7375dcde5c5..3df4e08e24b 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -44,6 +44,7 @@ ./hardware/video/ati.nix ./hardware/video/webcam/facetimehd.nix ./i18n/inputMethod/fcitx.nix + ./i18n/inputMethod/ibus.nix ./installer/tools/auto-upgrade.nix ./installer/tools/nixos-checkout.nix ./installer/tools/tools.nix @@ -67,7 +68,6 @@ ./programs/environment.nix ./programs/freetds.nix ./programs/fish.nix - ./programs/ibus.nix ./programs/kbdlight.nix ./programs/light.nix ./programs/man.nix diff --git a/nixos/modules/programs/ibus.nix b/nixos/modules/programs/ibus.nix deleted file mode 100644 index a42753a292b..00000000000 --- a/nixos/modules/programs/ibus.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.programs.ibus; -in -{ - options = { - - programs.ibus = { - enable = mkOption { - type = types.bool; - default = false; - example = true; - description = "Enable IBus input method"; - }; - plugins = mkOption { - type = lib.types.listOf lib.types.path; - default = []; - description = '' - IBus plugin packages - ''; - }; - }; - - }; - - config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.ibus pkgs.gnome3.dconf ]; - - gtkPlugins = [ pkgs.ibus ]; - qtPlugins = [ pkgs.ibus-qt ]; - - environment.variables = - let - env = pkgs.buildEnv { - name = "ibus-env"; - paths = [ pkgs.ibus ] ++ cfg.plugins; - }; - in { - GTK_IM_MODULE = "ibus"; - QT_IM_MODULE = "ibus"; - XMODIFIERS = "@im=ibus"; - - IBUS_COMPONENT_PATH = "${env}/share/ibus/component"; - }; - - services.xserver.displayManager.sessionCommands = "${pkgs.ibus}/bin/ibus-daemon --daemonize --xim --cache=none"; - }; -} diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 6e10b47f03c..698c28f37c8 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -59,6 +59,10 @@ with lib; # Tarsnap (mkRenamedOptionModule [ "services" "tarsnap" "config" ] [ "services" "tarsnap" "archives" ]) + # ibus + (mkRenamedOptionModule [ "programs" "ibus" "enable" ] [ "i18n" "inputMethod" "ibus" "enable" ]) + (mkRenamedOptionModule [ "programs" "ibus" "plugins" ] [ "i18n" "inputMethod" "ibus" "engines" ]) + # proxy (mkRenamedOptionModule [ "nix" "proxy" ] [ "networking" "proxy" "default" ]) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix index 4bdee391880..89039745fd9 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix @@ -6,11 +6,12 @@ stdenv.mkDerivation rec { version = "1.5.8"; meta = with stdenv.lib; { - description = "IBus interface to the anthy input method"; - homepage = http://wiki.github.com/fujiwarat/ibus-anthy; - license = licenses.gpl2Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ gebner ericsagnes ]; + isIbusEngine = true; + description = "IBus interface to the anthy input method"; + homepage = http://wiki.github.com/fujiwarat/ibus-anthy; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ gebner ericsagnes ]; }; preConfigure = "./autogen.sh --prefix=$out"; diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix index 5a6af4608c0..b682196d5d0 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix @@ -29,10 +29,11 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "Ibus Hangul engine."; - homepage = https://github.com/choehwanjin/ibus-hangul; - license = licenses.gpl2; - platforms = platforms.linux; - maintainers = with maintainers; [ ericsagnes ]; + isIbusEngine = true; + description = "Ibus Hangul engine."; + homepage = https://github.com/choehwanjin/ibus-hangul; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; }; } diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix index 9ab640990b1..e06d2b004ee 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix @@ -11,11 +11,12 @@ in clangStdenv.mkDerivation rec { version = "2.17.2313.102"; meta = with clangStdenv.lib; { - description = "Japanese input method from Google"; - homepage = http://code.google.com/p/mozc/; - license = licenses.free; - platforms = platforms.linux; - maintainers = with maintainers; [ gebner ericsagnes ]; + isIbusEngine = true; + description = "Japanese input method from Google"; + homepage = http://code.google.com/p/mozc/; + license = licenses.free; + platforms = platforms.linux; + maintainers = with maintainers; [ gebner ericsagnes ]; }; nativeBuildInputs = [ gyp which ninja python pkgconfig ]; diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix index f356bcdee85..13d9df5de08 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix @@ -20,10 +20,11 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "Various table-based input methods for IBus"; - homepage = https://github.com/moebiuscurve/ibus-table-others; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ mudri ]; + isIbusEngine = true; + description = "Various table-based input methods for IBus"; + homepage = https://github.com/moebiuscurve/ibus-table-others; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ mudri ]; }; } diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix index 58b890b0c92..244169cf46b 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix @@ -12,10 +12,11 @@ stdenv.mkDerivation rec { buildInputs = [ ibus pkgconfig python3 pythonPackages.pygobject3 ]; meta = with stdenv.lib; { - description = "An IBus framework for table-based input methods"; - homepage = https://github.com/kaio/ibus-table/wiki; - license = licenses.lgpl21; - platforms = platforms.linux; - maintainers = with maintainers; [ mudri ]; + isIbusEngine = true; + description = "An IBus framework for table-based input methods"; + homepage = https://github.com/kaio/ibus-table/wiki; + license = licenses.lgpl21; + platforms = platforms.linux; + maintainers = with maintainers; [ mudri ]; }; } From 2dac18aa01303be95dcf56cf4e0fa01ff30af05f Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Tue, 16 Feb 2016 22:46:17 +0900 Subject: [PATCH 15/21] uim: removed gtk and qt plugin update logic --- pkgs/tools/inputmethods/uim/data-hook.patch | 39 +++ pkgs/tools/inputmethods/uim/default.nix | 11 +- .../inputmethods/uim/immodules_cache.patch | 231 ------------------ 3 files changed, 45 insertions(+), 236 deletions(-) create mode 100644 pkgs/tools/inputmethods/uim/data-hook.patch delete mode 100644 pkgs/tools/inputmethods/uim/immodules_cache.patch diff --git a/pkgs/tools/inputmethods/uim/data-hook.patch b/pkgs/tools/inputmethods/uim/data-hook.patch new file mode 100644 index 00000000000..07fdf873316 --- /dev/null +++ b/pkgs/tools/inputmethods/uim/data-hook.patch @@ -0,0 +1,39 @@ +--- a/gtk2/immodule/Makefile.in 2015-11-24 16:21:08.967087208 +0900 ++++ b/gtk2/immodule/Makefile.in 2015-11-24 16:22:53.316095150 +0900 +@@ -806,7 +806,6 @@ + + install-data-am: install-moduleLTLIBRARIES + @$(NORMAL_INSTALL) +- $(MAKE) $(AM_MAKEFLAGS) install-data-hook + install-dvi: install-dvi-am + + install-dvi-am: +@@ -861,7 +860,7 @@ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ +- install-data-am install-data-hook install-dvi install-dvi-am \ ++ install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-moduleLTLIBRARIES install-pdf install-pdf-am \ + +--- a/gtk3/immodule/Makefile.in 2015-11-24 16:21:08.971087209 +0900 ++++ b/gtk3/immodule/Makefile.in 2015-11-24 16:23:28.251097832 +0900 +@@ -824,7 +824,6 @@ + + install-data-am: install-moduleLTLIBRARIES + @$(NORMAL_INSTALL) +- $(MAKE) $(AM_MAKEFLAGS) install-data-hook + install-dvi: install-dvi-am + + install-dvi-am: +@@ -879,7 +878,7 @@ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ +- install-data-am install-data-hook install-dvi install-dvi-am \ ++ install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-moduleLTLIBRARIES install-pdf install-pdf-am diff --git a/pkgs/tools/inputmethods/uim/default.nix b/pkgs/tools/inputmethods/uim/default.nix index 19de302e7b1..99a415407c1 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { m17n_db ]; - patches = [ ./immodules_cache.patch ]; + patches = [ ./data-hook.patch ]; configureFlags = [ "--with-gtk2" @@ -41,10 +41,11 @@ stdenv.mkDerivation rec { sha1 = "43b9dbdead6797880e6cfc9c032ecb2d37d42777"; }; - meta = { - homepage = "http://code.google.com/p/uim/"; + meta = with stdenv.lib; { + homepage = "http://code.google.com/p/uim/"; description = "A multilingual input method framework"; - license = stdenv.lib.licenses.bsd3; - platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; }; } diff --git a/pkgs/tools/inputmethods/uim/immodules_cache.patch b/pkgs/tools/inputmethods/uim/immodules_cache.patch deleted file mode 100644 index c2d08b661e3..00000000000 --- a/pkgs/tools/inputmethods/uim/immodules_cache.patch +++ /dev/null @@ -1,231 +0,0 @@ -diff -ru -x '*~' uim-1.8.6.orig/gtk2/immodule/Makefile.am uim-1.8.6/gtk2/immodule/Makefile.am ---- uim-1.8.6.orig/gtk2/immodule/Makefile.am 2013-06-30 13:26:09.000000000 +0900 -+++ uim-1.8.6/gtk2/immodule/Makefile.am 2014-07-13 21:51:26.538400004 +0900 -@@ -1,5 +1,5 @@ - uim_gtk_im_module_path = $(libdir)/gtk-2.0 --uim_gtk_im_module_file = $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules -+uim_gtk_im_module_file = $(uim_gtk_im_module_path)/@GTK_BINARY_VERSION@/immodules.cache - - moduledir = $(uim_gtk_im_module_path)/@GTK_BINARY_VERSION@/immodules - -@@ -38,48 +38,12 @@ - - install-data-hook: gtk-rc-get-immodule-file - if test -z $(DESTDIR); then \ -- if test $(libdir) = $(GTK_LIBDIR); then \ -- if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ -- $(QUERY_COMMAND) > `$(GTK_RC_GET_IMMODULE_FILE)`; \ -- echo "*** \"`$(GTK_RC_GET_IMMODULE_FILE)`\" is updated. ***"; \ -- else \ -- echo "********************** Warning ***********************"; \ -- echo " $(QUERY_COMMAND) not found"; \ -- echo " Please make sure to update"; \ -- echo " \"`$(GTK_RC_GET_IMMODULE_FILE)`\""; \ -- echo " manually."; \ -- echo "******************************************************"; \ -- fi \ -- else \ -- if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ -- $(mkinstalldirs) $(sysconfdir)/gtk-2.0; \ -- GTK_PATH=$(uim_gtk_im_module_path) $(QUERY_COMMAND) > $(uim_gtk_im_module_file); \ -- echo "******************************************************"; \ -- echo " You need to set"; \ -- echo " GTK_IM_MODULE_FILE=$(uim_gtk_im_module_file)"; \ -- echo " environment variable to use this module."; \ -- echo "******************************************************"; \ -- else \ -- echo "********************** Warning ***********************"; \ -- echo " $(QUERY_COMMAND) not found"; \ -- echo " Please make sure to update"; \ -- echo " \"$(uim_gtk_im_module_file)\""; \ -- echo " manually, and set"; \ -- echo " GTK_IM_MODULE_FILE=$(uim_gtk_im_module_file)"; \ -- echo " environment variable to use this module."; \ -- echo "******************************************************"; \ -- fi \ -- fi \ -+ $(mkinstalldirs) $(uim_gtk_im_module_path)/@GTK_BINARY_VERSION@; \ -+ GTK_PATH=$(uim_gtk_im_module_path) $(QUERY_COMMAND) > $(uim_gtk_im_module_file); \ - fi - uninstall-hook: - if test -z $(DESTDIR); then \ -- if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ -- if test $(libdir) = $(GTK_LIBDIR); then \ -- $(QUERY_COMMAND) > `$(GTK_RC_GET_IMMODULE_FILE)`; \ -- else \ -- GTK_PATH=$(uim_gtk_im_module_path) $(QUERY_COMMAND) > $(uim_gtk_im_module_file); \ -- fi \ -- fi \ -+ GTK_PATH=$(uim_gtk_im_module_path) $(QUERY_COMMAND) > $(uim_gtk_im_module_file); \ - fi - else - install-data-hook: -diff -ru -x '*~' uim-1.8.6.orig/gtk2/immodule/Makefile.in uim-1.8.6/gtk2/immodule/Makefile.in ---- uim-1.8.6.orig/gtk2/immodule/Makefile.in 2013-06-30 13:27:08.000000000 +0900 -+++ uim-1.8.6/gtk2/immodule/Makefile.in 2014-07-13 22:12:27.947595507 +0900 -@@ -434,7 +434,7 @@ - top_srcdir = @top_srcdir@ - uim_pixmapsdir = @uim_pixmapsdir@ - uim_gtk_im_module_path = $(libdir)/gtk-2.0 --uim_gtk_im_module_file = $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules -+uim_gtk_im_module_file = $(uim_gtk_im_module_path)/@GTK_BINARY_VERSION@/immodules.cache - moduledir = $(uim_gtk_im_module_path)/@GTK_BINARY_VERSION@/immodules - @GTK2_TRUE@im_uim_la = im-uim.la - @GTK2_TRUE@im_uim_la_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) -@@ -875,48 +875,12 @@ - - @GTK2_TRUE@install-data-hook: gtk-rc-get-immodule-file - @GTK2_TRUE@ if test -z $(DESTDIR); then \ --@GTK2_TRUE@ if test $(libdir) = $(GTK_LIBDIR); then \ --@GTK2_TRUE@ if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ --@GTK2_TRUE@ $(QUERY_COMMAND) > `$(GTK_RC_GET_IMMODULE_FILE)`; \ --@GTK2_TRUE@ echo "*** \"`$(GTK_RC_GET_IMMODULE_FILE)`\" is updated. ***"; \ --@GTK2_TRUE@ else \ --@GTK2_TRUE@ echo "********************** Warning ***********************"; \ --@GTK2_TRUE@ echo " $(QUERY_COMMAND) not found"; \ --@GTK2_TRUE@ echo " Please make sure to update"; \ --@GTK2_TRUE@ echo " \"`$(GTK_RC_GET_IMMODULE_FILE)`\""; \ --@GTK2_TRUE@ echo " manually."; \ --@GTK2_TRUE@ echo "******************************************************"; \ --@GTK2_TRUE@ fi \ --@GTK2_TRUE@ else \ --@GTK2_TRUE@ if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ --@GTK2_TRUE@ $(mkinstalldirs) $(sysconfdir)/gtk-2.0; \ --@GTK2_TRUE@ GTK_PATH=$(uim_gtk_im_module_path) $(QUERY_COMMAND) > $(uim_gtk_im_module_file); \ --@GTK2_TRUE@ echo "******************************************************"; \ --@GTK2_TRUE@ echo " You need to set"; \ --@GTK2_TRUE@ echo " GTK_IM_MODULE_FILE=$(uim_gtk_im_module_file)"; \ --@GTK2_TRUE@ echo " environment variable to use this module."; \ --@GTK2_TRUE@ echo "******************************************************"; \ --@GTK2_TRUE@ else \ --@GTK2_TRUE@ echo "********************** Warning ***********************"; \ --@GTK2_TRUE@ echo " $(QUERY_COMMAND) not found"; \ --@GTK2_TRUE@ echo " Please make sure to update"; \ --@GTK2_TRUE@ echo " \"$(uim_gtk_im_module_file)\""; \ --@GTK2_TRUE@ echo " manually, and set"; \ --@GTK2_TRUE@ echo " GTK_IM_MODULE_FILE=$(uim_gtk_im_module_file)"; \ --@GTK2_TRUE@ echo " environment variable to use this module."; \ --@GTK2_TRUE@ echo "******************************************************"; \ --@GTK2_TRUE@ fi \ --@GTK2_TRUE@ fi \ -+@GTK2_TRUE@ $(mkinstalldirs) $(uim_gtk_im_module_path)/@GTK_BINARY_VERSION@; \ -+@GTK2_TRUE@ GTK_PATH=$(uim_gtk_im_module_path) $(QUERY_COMMAND) > $(uim_gtk_im_module_file); \ - @GTK2_TRUE@ fi - @GTK2_TRUE@uninstall-hook: - @GTK2_TRUE@ if test -z $(DESTDIR); then \ --@GTK2_TRUE@ if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ --@GTK2_TRUE@ if test $(libdir) = $(GTK_LIBDIR); then \ --@GTK2_TRUE@ $(QUERY_COMMAND) > `$(GTK_RC_GET_IMMODULE_FILE)`; \ --@GTK2_TRUE@ else \ --@GTK2_TRUE@ GTK_PATH=$(uim_gtk_im_module_path) $(QUERY_COMMAND) > $(uim_gtk_im_module_file); \ --@GTK2_TRUE@ fi \ --@GTK2_TRUE@ fi \ -+@GTK2_TRUE@ GTK_PATH=$(uim_gtk_im_module_path) $(QUERY_COMMAND) > $(uim_gtk_im_module_file); \ - @GTK2_TRUE@ fi - @GTK2_FALSE@install-data-hook: - -diff -ru -x '*~' uim-1.8.6.orig/gtk3/immodule/Makefile.am uim-1.8.6/gtk3/immodule/Makefile.am ---- uim-1.8.6.orig/gtk3/immodule/Makefile.am 2013-06-30 13:26:20.000000000 +0900 -+++ uim-1.8.6/gtk3/immodule/Makefile.am 2014-07-13 21:55:38.114246503 +0900 -@@ -45,42 +45,11 @@ - - install-data-hook: gtk3-rc-get-immodule-file - if test -z $(DESTDIR); then \ -- if test $(libdir) = $(GTK3_LIBDIR); then \ -- if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ -- $(QUERY_COMMAND) --update-cache; \ -- echo "*** \"`$(GTK3_RC_GET_IMMODULE_FILE)`\" is updated. ***"; \ -- else \ -- echo "********************** Warning ***********************"; \ -- echo " $(QUERY_COMMAND) not found"; \ -- echo " Please make sure to update"; \ -- echo " \"`$(GTK3_RC_GET_IMMODULE_FILE)`\""; \ -- echo " manually."; \ -- echo "******************************************************"; \ -- fi \ -- else \ -- if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ -- GTK_PATH=$(uim_gtk3_im_module_path) $(QUERY_COMMAND) --update-cache; \ -- else \ -- echo "********************** Warning ***********************"; \ -- echo " $(QUERY_COMMAND) not found"; \ -- echo " Please make sure to update"; \ -- echo " immodules.cache"; \ -- echo " manually, and set"; \ -- echo " GTK_IM_MODULE_FILE=PATH_TO/immodule.cache"; \ -- echo " environment variable to use this module."; \ -- echo "******************************************************"; \ -- fi \ -- fi \ -+ GTK_PATH=$(uim_gtk3_im_module_path) $(QUERY_COMMAND) > $(uim_gtk3_im_module_path)/@GTK3_BINARY_VERSION@/immodules.cache ; \ - fi - uninstall-hook: - if test -z $(DESTDIR); then \ -- if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ -- if test $(libdir) = $(GTK3_LIBDIR); then \ -- $(QUERY_COMMAND) --update-cache; \ -- else \ -- GTK_PATH=$(uim_gtk3_im_module_path) $(QUERY_COMMAND) --update-cache; \ -- fi \ -- fi \ -+ GTK_PATH=$(uim_gtk3_im_module_path) $(QUERY_COMMAND) > $(uim_gtk3_im_module_path)/@GTK3_BINARY_VERSION@/immodules.cache ; \ - fi - else - install-data-hook: -diff -ru -x '*~' uim-1.8.6.orig/gtk3/immodule/Makefile.in uim-1.8.6/gtk3/immodule/Makefile.in ---- uim-1.8.6.orig/gtk3/immodule/Makefile.in 2013-06-30 13:27:08.000000000 +0900 -+++ uim-1.8.6/gtk3/immodule/Makefile.in 2014-07-13 21:56:11.531225832 +0900 -@@ -893,42 +893,11 @@ - - @GTK3_TRUE@install-data-hook: gtk3-rc-get-immodule-file - @GTK3_TRUE@ if test -z $(DESTDIR); then \ --@GTK3_TRUE@ if test $(libdir) = $(GTK3_LIBDIR); then \ --@GTK3_TRUE@ if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ --@GTK3_TRUE@ $(QUERY_COMMAND) --update-cache; \ --@GTK3_TRUE@ echo "*** \"`$(GTK3_RC_GET_IMMODULE_FILE)`\" is updated. ***"; \ --@GTK3_TRUE@ else \ --@GTK3_TRUE@ echo "********************** Warning ***********************"; \ --@GTK3_TRUE@ echo " $(QUERY_COMMAND) not found"; \ --@GTK3_TRUE@ echo " Please make sure to update"; \ --@GTK3_TRUE@ echo " \"`$(GTK3_RC_GET_IMMODULE_FILE)`\""; \ --@GTK3_TRUE@ echo " manually."; \ --@GTK3_TRUE@ echo "******************************************************"; \ --@GTK3_TRUE@ fi \ --@GTK3_TRUE@ else \ --@GTK3_TRUE@ if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ --@GTK3_TRUE@ GTK_PATH=$(uim_gtk3_im_module_path) $(QUERY_COMMAND) --update-cache; \ --@GTK3_TRUE@ else \ --@GTK3_TRUE@ echo "********************** Warning ***********************"; \ --@GTK3_TRUE@ echo " $(QUERY_COMMAND) not found"; \ --@GTK3_TRUE@ echo " Please make sure to update"; \ --@GTK3_TRUE@ echo " immodules.cache"; \ --@GTK3_TRUE@ echo " manually, and set"; \ --@GTK3_TRUE@ echo " GTK_IM_MODULE_FILE=PATH_TO/immodule.cache"; \ --@GTK3_TRUE@ echo " environment variable to use this module."; \ --@GTK3_TRUE@ echo "******************************************************"; \ --@GTK3_TRUE@ fi \ --@GTK3_TRUE@ fi \ -+@GTK3_TRUE@ GTK_PATH=$(uim_gtk3_im_module_path) $(QUERY_COMMAND) > $(uim_gtk3_im_module_path)/@GTK3_BINARY_VERSION@/immodules.cache ; \ - @GTK3_TRUE@ fi - @GTK3_TRUE@uninstall-hook: - @GTK3_TRUE@ if test -z $(DESTDIR); then \ --@GTK3_TRUE@ if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ --@GTK3_TRUE@ if test $(libdir) = $(GTK3_LIBDIR); then \ --@GTK3_TRUE@ $(QUERY_COMMAND) --update-cache; \ --@GTK3_TRUE@ else \ --@GTK3_TRUE@ GTK_PATH=$(uim_gtk3_im_module_path) $(QUERY_COMMAND) --update-cache; \ --@GTK3_TRUE@ fi \ --@GTK3_TRUE@ fi \ -+@GTK3_TRUE@ GTK_PATH=$(uim_gtk3_im_module_path) $(QUERY_COMMAND) > $(uim_gtk3_im_module_path)/@GTK3_BINARY_VERSION@/immodules.cache ; \ - @GTK3_TRUE@ fi - @GTK3_FALSE@install-data-hook: - -diff -ru -x '*~' uim-1.8.6.orig/qt4/immodule/quiminputcontextplugin.pro.in uim-1.8.6/qt4/immodule/quiminputcontextplugin.pro.in ---- uim-1.8.6.orig/qt4/immodule/quiminputcontextplugin.pro.in 2013-06-30 13:26:20.000000000 +0900 -+++ uim-1.8.6/qt4/immodule/quiminputcontextplugin.pro.in 2014-03-09 11:31:19.388085048 +0900 -@@ -35,4 +35,4 @@ - - TARGET = uiminputcontextplugin - --target.path += @DESTDIR@$$[QT_INSTALL_PLUGINS]/inputmethods -+target.path += @DESTDIR@@exec_prefix@/lib/qt4/plugins/inputmethods From 4a199d99552046e2ffd743d501d4ee4696038b42 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Tue, 16 Feb 2016 22:52:25 +0900 Subject: [PATCH 16/21] uim service: init --- nixos/modules/i18n/inputMethod/uim.nix | 48 ++++++++++++++++++++++++++ nixos/modules/module-list.nix | 1 + 2 files changed, 49 insertions(+) create mode 100644 nixos/modules/i18n/inputMethod/uim.nix diff --git a/nixos/modules/i18n/inputMethod/uim.nix b/nixos/modules/i18n/inputMethod/uim.nix new file mode 100644 index 00000000000..0154cdc5057 --- /dev/null +++ b/nixos/modules/i18n/inputMethod/uim.nix @@ -0,0 +1,48 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.i18n.inputMethod.uim; +in +{ + options = { + + i18n.inputMethod.uim = { + enable = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Enable uim input method. + Uim can be used to input of Chinese, Korean, Japanese and other special characters. + ''; + }; + toolbar = mkOption { + type = types.enum [ "gtk" "gtk3" "gtk-systray" "gtk3-systray" "qt4" ]; + default = "gtk"; + example = "gtk-systray"; + description = '' + selected UIM toolbar. + ''; + }; + }; + + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.uim ]; + gtkPlugins = [ pkgs.uim ]; + qtPlugins = [ pkgs.uim ]; + + environment.variables = { + GTK_IM_MODULE = "uim"; + QT_IM_MODULE = "uim"; + XMODIFIERS = "@im=uim"; + }; + services.xserver.displayManager.sessionCommands = '' + ${pkgs.uim}/bin/uim-xim & + ${pkgs.uim}/bin/uim-toolbar-${cfg.toolbar} & + ''; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 3df4e08e24b..9a7083c3ce8 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -45,6 +45,7 @@ ./hardware/video/webcam/facetimehd.nix ./i18n/inputMethod/fcitx.nix ./i18n/inputMethod/ibus.nix + ./i18n/inputMethod/uim.nix ./installer/tools/auto-upgrade.nix ./installer/tools/nixos-checkout.nix ./installer/tools/tools.nix From 3ed3f061dad30f9ae8b7712b0b46140b415d4ab3 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Tue, 16 Feb 2016 23:01:03 +0900 Subject: [PATCH 17/21] nabi service: init --- nixos/modules/i18n/inputMethod/nabi.nix | 37 +++++++++++++++++++++++++ nixos/modules/module-list.nix | 1 + 2 files changed, 38 insertions(+) create mode 100644 nixos/modules/i18n/inputMethod/nabi.nix diff --git a/nixos/modules/i18n/inputMethod/nabi.nix b/nixos/modules/i18n/inputMethod/nabi.nix new file mode 100644 index 00000000000..7f97135fee1 --- /dev/null +++ b/nixos/modules/i18n/inputMethod/nabi.nix @@ -0,0 +1,37 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.i18n.inputMethod.nabi; +in +{ + options = { + + i18n.inputMethod.nabi = { + enable = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Enable nabi input method. + Nabi can be used to input Korean. + ''; + }; + }; + + }; +{ + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.nabi ]; + qtPlugins = [ pkgs.nabi ]; + + environment.variables = { + GTK_IM_MODULE = "nabi"; + QT_IM_MODULE = "nabi"; + XMODIFIERS = "@im=nabi"; + }; + + services.xserver.displayManager.sessionCommands = "${pkgs.nabi}/bin/nabi &"; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 9a7083c3ce8..7fe4a90a135 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -45,6 +45,7 @@ ./hardware/video/webcam/facetimehd.nix ./i18n/inputMethod/fcitx.nix ./i18n/inputMethod/ibus.nix + ./i18n/inputMethod/nabi.nix ./i18n/inputMethod/uim.nix ./installer/tools/auto-upgrade.nix ./installer/tools/nixos-checkout.nix From 3ad12f2decdab0da872899107917e8c247fd07dc Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Tue, 16 Feb 2016 23:10:46 +0900 Subject: [PATCH 18/21] inputMethod service: init --- nixos/modules/i18n/inputMethod/default.nix | 29 ++++++++++++++++++++++ nixos/modules/i18n/inputMethod/fcitx.nix | 11 +------- nixos/modules/i18n/inputMethod/ibus.nix | 11 +------- nixos/modules/i18n/inputMethod/nabi.nix | 22 +--------------- nixos/modules/i18n/inputMethod/uim.nix | 11 +------- nixos/modules/module-list.nix | 1 + nixos/modules/rename.nix | 1 - 7 files changed, 34 insertions(+), 52 deletions(-) create mode 100644 nixos/modules/i18n/inputMethod/default.nix diff --git a/nixos/modules/i18n/inputMethod/default.nix b/nixos/modules/i18n/inputMethod/default.nix new file mode 100644 index 00000000000..7e6a25bfb08 --- /dev/null +++ b/nixos/modules/i18n/inputMethod/default.nix @@ -0,0 +1,29 @@ +{ config, pkgs, lib, ... }: + +with lib; + +{ + options = { + i18n.inputMethod = { + enabled = mkOption { + type = types.nullOr (types.enum [ "ibus" "fcitx" "nabi" "uim" ]); + default = null; + example = "fcitx"; + description = '' + Select the enabled input method. Input methods is a software to input symbols that are not available on standard input devices. + + Input methods are specially used to input Chinese, Japanese and Korean characters. + + Currently the following input methods are available in NixOS: + + + ibus: The intelligent input bus, extra input engines can be added using i18n.inputMethod.ibus.engines. + fcitx: A customizable lightweight input method, extra input engines can be added using i18n.inputMethod.fcitx.engines. + nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5. + uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean. + + ''; + }; + }; + }; +} diff --git a/nixos/modules/i18n/inputMethod/fcitx.nix b/nixos/modules/i18n/inputMethod/fcitx.nix index b0e7578810a..f168f445170 100644 --- a/nixos/modules/i18n/inputMethod/fcitx.nix +++ b/nixos/modules/i18n/inputMethod/fcitx.nix @@ -14,15 +14,6 @@ in options = { i18n.inputMethod.fcitx = { - enable = mkOption { - type = types.bool; - default = false; - example = true; - description = '' - Enable Fcitx input method. - Fcitx can be used to input of Chinese, Korean, Japanese and other special characters. - ''; - }; engines = mkOption { type = with types; listOf fcitxEngine; default = []; @@ -36,7 +27,7 @@ in }; - config = mkIf cfg.enable { + config = mkIf (config.i18n.inputMethod.enabled == "fcitx") { environment.systemPackages = [ fcitxPackage ]; gtkPlugins = [ fcitxPackage ]; qtPlugins = [ fcitxPackage ]; diff --git a/nixos/modules/i18n/inputMethod/ibus.nix b/nixos/modules/i18n/inputMethod/ibus.nix index e4bc15cf891..86059751a3d 100644 --- a/nixos/modules/i18n/inputMethod/ibus.nix +++ b/nixos/modules/i18n/inputMethod/ibus.nix @@ -13,15 +13,6 @@ in { options = { i18n.inputMethod.ibus = { - enable = mkOption { - type = types.bool; - default = false; - example = true; - description = '' - Enable IBus input method. - IBus can be used input of Chinese, Korean, Japanese and other special characters. - ''; - }; engines = mkOption { type = with types; listOf ibusEngine; default = []; @@ -34,7 +25,7 @@ in }; }; - config = mkIf cfg.enable { + config = mkIf (config.i18n.inputMethod.enabled == "ibus") { # Without dconf enabled it is impossible to use IBus environment.systemPackages = [ ibusPackage pkgs.gnome3.dconf ]; diff --git a/nixos/modules/i18n/inputMethod/nabi.nix b/nixos/modules/i18n/inputMethod/nabi.nix index 7f97135fee1..8c396595513 100644 --- a/nixos/modules/i18n/inputMethod/nabi.nix +++ b/nixos/modules/i18n/inputMethod/nabi.nix @@ -1,28 +1,8 @@ { config, pkgs, lib, ... }: with lib; - -let - cfg = config.i18n.inputMethod.nabi; -in { - options = { - - i18n.inputMethod.nabi = { - enable = mkOption { - type = types.bool; - default = false; - example = true; - description = '' - Enable nabi input method. - Nabi can be used to input Korean. - ''; - }; - }; - - }; -{ - config = mkIf cfg.enable { + config = mkIf (config.i18n.inputMethod.enabled == "nabi") { environment.systemPackages = [ pkgs.nabi ]; qtPlugins = [ pkgs.nabi ]; diff --git a/nixos/modules/i18n/inputMethod/uim.nix b/nixos/modules/i18n/inputMethod/uim.nix index 0154cdc5057..401e1932f70 100644 --- a/nixos/modules/i18n/inputMethod/uim.nix +++ b/nixos/modules/i18n/inputMethod/uim.nix @@ -9,15 +9,6 @@ in options = { i18n.inputMethod.uim = { - enable = mkOption { - type = types.bool; - default = false; - example = true; - description = '' - Enable uim input method. - Uim can be used to input of Chinese, Korean, Japanese and other special characters. - ''; - }; toolbar = mkOption { type = types.enum [ "gtk" "gtk3" "gtk-systray" "gtk3-systray" "qt4" ]; default = "gtk"; @@ -30,7 +21,7 @@ in }; - config = mkIf cfg.enable { + config = mkIf (config.i18n.inputMethod.enabled == "uim") { environment.systemPackages = [ pkgs.uim ]; gtkPlugins = [ pkgs.uim ]; qtPlugins = [ pkgs.uim ]; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 7fe4a90a135..eb4045fdfdc 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -43,6 +43,7 @@ ./hardware/video/nvidia.nix ./hardware/video/ati.nix ./hardware/video/webcam/facetimehd.nix + ./i18n/inputMethod/default.nix ./i18n/inputMethod/fcitx.nix ./i18n/inputMethod/ibus.nix ./i18n/inputMethod/nabi.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 698c28f37c8..6d5ee6fc84e 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -60,7 +60,6 @@ with lib; (mkRenamedOptionModule [ "services" "tarsnap" "config" ] [ "services" "tarsnap" "archives" ]) # ibus - (mkRenamedOptionModule [ "programs" "ibus" "enable" ] [ "i18n" "inputMethod" "ibus" "enable" ]) (mkRenamedOptionModule [ "programs" "ibus" "plugins" ] [ "i18n" "inputMethod" "ibus" "engines" ]) # proxy From 2d5537d89efb93eda88e96beb13ab169f2e08c37 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Sat, 20 Feb 2016 10:22:54 +0900 Subject: [PATCH 19/21] fcitx-m17n: init at 0.2.3 --- .../fcitx-engines/fcitx-m17n/default.nix | 29 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/tools/inputmethods/fcitx-engines/fcitx-m17n/default.nix diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-m17n/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-m17n/default.nix new file mode 100644 index 00000000000..ff42bbbbcc8 --- /dev/null +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-m17n/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, cmake, fcitx, gettext, m17n_lib, m17n_db, pkgconfig }: + +stdenv.mkDerivation rec { + name = "fcitx-m17n-${version}"; + version = "0.2.3"; + + src = fetchurl { + url = "http://download.fcitx-im.org/fcitx-m17n/${name}.tar.xz"; + sha256 = "0ffyhsg7bc6525k94kfhnja1h6ajlfprq72d286dp54cksnakyc4"; + }; + + buildInputs = [ cmake fcitx gettext m17n_lib m17n_db pkgconfig ]; + + preInstall = '' + substituteInPlace im/cmake_install.cmake \ + --replace ${fcitx} $out + ''; + + meta = with stdenv.lib; { + isFcitxEngine = true; + homepage = "https://github.com/fcitx/fcitx-m17n"; + downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; + description = "Fcitx wrapper for m17n"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index db3bc6abdc2..89af7ad5a8c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1529,6 +1529,8 @@ let hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; + m17n = callPackage ../tools/inputmethods/fcitx-engines/fcitx-m17n { }; + mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { inherit (pythonPackages) gyp; }; From 9e7ddbdcbd8d33f996242774aef630204b264613 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Sat, 20 Feb 2016 10:49:35 +0900 Subject: [PATCH 20/21] ibus-m17n: init at 1.3.4 --- .../ibus-engines/ibus-m17n/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix new file mode 100644 index 00000000000..30329c4306f --- /dev/null +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, ibus, m17n_lib, m17n_db, automake, autoconf, + gettext, libtool, pkgconfig, python, pythonPackages }: + +stdenv.mkDerivation rec { + name = "ibus-m17n-${version}"; + version = "1.3.4"; + + src = fetchFromGitHub { + owner = "ibus"; + repo = "ibus-m17n"; + rev = version; + sha256 = "1n0bvgc4jyksgvzrw5zs2pxcpxcn3gcc0j2kasbznm34fpv3frsr"; + }; + + buildInputs = [ + ibus m17n_lib m17n_db automake autoconf gettext + libtool pkgconfig python pythonPackages.pygobject3 + ]; + + preConfigure = '' + autoreconf --verbose --force --install + ''; + + meta = with stdenv.lib; { + isIbusEngine = true; + description = "m17n engine for ibus."; + homepage = https://github.com.com/ibus/ibus-m17n; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ ericsagnes ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 89af7ad5a8c..3929c174b13 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1180,6 +1180,8 @@ let hangul = callPackage ../tools/inputmethods/ibus-engines/ibus-hangul { }; + m17n = callPackage ../tools/inputmethods/ibus-engines/ibus-m17n { }; + mozc = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc { inherit (pythonPackages) gyp; }; From dc6bd6118730873a9746261ba72d9ae5fe497607 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Tue, 16 Feb 2016 23:32:01 +0900 Subject: [PATCH 21/21] added input method related changelog --- .../doc/manual/release-notes/rl-unstable.xml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-unstable.xml b/nixos/doc/manual/release-notes/rl-unstable.xml index c2d1563e0a5..393f0fdeb40 100644 --- a/nixos/doc/manual/release-notes/rl-unstable.xml +++ b/nixos/doc/manual/release-notes/rl-unstable.xml @@ -44,6 +44,7 @@ nixos.path = ./nixpkgs-unstable-2015-12-06/nixos; services/networking/pdnsd.nix services/web-apps/pump.io.nix services/security/haka.nix + i18n/inputMethod/default.nix @@ -197,6 +198,32 @@ fileSystems."/example" = { services.hardware.opengl.extraPackages{,32} instead. You can also specify VDPAU drivers there. + + + + programs.ibus moved to i18n.inputMethod.ibus. + The option programs.ibus.plugins changed to i18n.inputMethod.ibus.engines + and the option to enable ibus changed from programs.ibus.enable to + i18n.inputMethod.enabled. + i18n.inputMethod.enabled should be set to the used input method name, + "ibus" for ibus. + An example of the new style: + + +i18n.inputMethod.enabled = "ibus"; +i18n.inputMethod.ibus.engines = with pkgs.ibus-engines; [ anthy mozc ]; + + +That is equivalent to the old version: + + +programs.ibus.enable = true; +programs.ibus.plugins = with pkgs; [ ibus-anthy mozc ]; + + + + + @@ -215,6 +242,12 @@ fileSystems."/example" = { NixOS. + + Input method support was improved. New NixOS modules (fcitx, nabi and uim), + fcitx engines (chewing, hangul, m17n, mozc and table-other) and ibus engines (hangul and m17n) + have been added. + +