git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #6765 from gebner/ibus-plugins

Add ibus-qt and ibus-anthy.

commit14ed261fc741b803f21ec54111cfe04c72680f4e authorlethalman <lucabru@src.gnome.org> dateThu 12 Mar 2015, 14:35 (12 years ago) parent6cd99a42e8cbfb
7 files changed+113−2
lib/maintainers.nix+1 nixos/modules/module-list.nix+1 nixos/modules/programs/ibus.nix+51 pkgs/tools/inputmethods/ibus-anthy/default.nix+29 pkgs/tools/inputmethods/ibus-qt/default.nix+25 pkgs/development/libraries/ibus/default.nix → pkgs/tools/inputmethods/ibus/default.nix pkgs/top-level/all-packages.nix+6−2
lib/maintainers.nix+1
@@ -80,6 +80,7 @@
8080 garbas = "Rok Garbas <rok@garbas.si>";
8181 garrison = "Jim Garrison <jim@garrison.cc>";
8282 gavin = "Gavin Rogers <gavin@praxeology.co.uk>";
83+ gebner = "Gabriel Ebner <gebner@gebner.org>";
8384 globin = "Robin Gloster <robin@glob.in>";
8485 goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
8586 gridaphobe = "Eric Seidel <eric@seidel.io>";
nixos/modules/module-list.nix+1
@@ -60,6 +60,7 @@
6060 ./programs/dconf.nix
6161 ./programs/environment.nix
6262 ./programs/info.nix
63+ ./programs/ibus.nix
6364 ./programs/light.nix
6465 ./programs/nano.nix
6566 ./programs/screen.nix
nixos/modules/programs/ibus.nixnew file+51
@@ -0,0 +1,51 @@
1+{ config, pkgs, lib, ... }:
2+
3+with lib;
4+
5+let
6+ cfg = config.programs.ibus;
7+in
8+{
9+ options = {
10+
11+ programs.ibus = {
12+ enable = mkOption {
13+ type = types.bool;
14+ default = false;
15+ example = true;
16+ description = "Enable IBus input method";
17+ };
18+ plugins = mkOption {
19+ type = lib.types.listOf lib.types.path;
20+ default = [];
21+ description = ''
22+ IBus plugin packages
23+ '';
24+ };
25+ };
26+
27+ };
28+
29+ config = mkIf cfg.enable {
30+ environment.systemPackages = [ pkgs.ibus ];
31+
32+ gtkPlugins = [ pkgs.ibus ];
33+ qtPlugins = [ pkgs.ibus-qt ];
34+
35+ environment.variables =
36+ let
37+ env = pkgs.buildEnv {
38+ name = "ibus-env";
39+ paths = [ pkgs.ibus ] ++ cfg.plugins;
40+ };
41+ in {
42+ GTK_IM_MODULE = "ibus";
43+ QT_IM_MODULE = "ibus";
44+ XMODIFIERS = "@im=ibus";
45+
46+ IBUS_COMPONENT_PATH = "${env}/share/ibus/component";
47+ };
48+
49+ services.xserver.displayManager.sessionCommands = "${pkgs.ibus}/bin/ibus-daemon --daemonize --xim --cache=none";
50+ };
51+}
pkgs/tools/inputmethods/ibus-anthy/default.nixnew file+29
@@ -0,0 +1,29 @@
1+{ stdenv, fetchurl, makeWrapper, ibus, anthy, intltool, pkgconfig, glib, gobjectIntrospection, python, pythonPackages }:
2+
3+let version = "1.5.4";
4+in stdenv.mkDerivation {
5+ name = "ibus-anthy-${version}";
6+
7+ meta = with stdenv.lib; {
8+ description = "IBus interface to the anthy input method";
9+ homepace = https://code.google.com/p/ibus/;
10+ license = licenses.gpl2Plus;
11+ platforms = platforms.linux;
12+ maintainers = with maintainers; [ gebner ];
13+ };
14+
15+ buildInputs = [ makeWrapper ibus anthy intltool pkgconfig glib gobjectIntrospection python pythonPackages.pygobject3 ];
16+
17+ postFixup = ''
18+ for file in "$out"/libexec/*; do
19+ wrapProgram "$file" \
20+ --prefix PYTHONPATH : $PYTHONPATH \
21+ --prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH:$out/lib/girepository-1.0
22+ done
23+ '';
24+
25+ src = fetchurl {
26+ url = "https://ibus.googlecode.com/files/ibus-anthy-${version}.tar.gz";
27+ sha256 = "4c0a8b88a2c547e72173a7d682d82797f6c65fe712abe5f3b89495d4eec7b031";
28+ };
29+}
pkgs/tools/inputmethods/ibus-qt/default.nixnew file+25
@@ -0,0 +1,25 @@
1+{ stdenv, fetchurl, ibus, cmake, pkgconfig, qt4, icu, doxygen }:
2+
3+stdenv.mkDerivation rec {
4+ name = "ibus-qt-${version}";
5+ version = "1.3.2";
6+
7+ src = fetchurl {
8+ url = "http://ibus.googlecode.com/files/${name}-Source.tar.gz";
9+ sha256 = "070c8ef4e6c74eddf7ddf4385936aed730c2dfe2160162e5c56b5158d1061a76";
10+ };
11+
12+ buildInputs = [
13+ ibus cmake pkgconfig qt4 icu doxygen
14+ ];
15+
16+ cmakeFlags = [ "-DQT_PLUGINS_DIR=lib/qt4/plugins" ];
17+
18+ meta = with stdenv.lib; {
19+ homepage = https://code.google.com/p/ibus/;
20+ description = "Qt4 interface to the ibus input method";
21+ platforms = platforms.linux;
22+ license = licenses.gpl2Plus;
23+ maintainers = with maintainers; [ gebner ];
24+ };
25+}
pkgs/development/libraries/ibus/default.nix → pkgs/tools/inputmethods/ibus/default.nixrenamed

The content is the same.

pkgs/top-level/all-packages.nix+6−2
@@ -959,6 +959,12 @@ let
959959
960960 anthy = callPackage ../tools/inputmethods/anthy { };
961961
962+ ibus = callPackage ../tools/inputmethods/ibus { };
963+
964+ ibus-qt = callPackage ../tools/inputmethods/ibus-qt { };
965+
966+ ibus-anthy = callPackage ../tools/inputmethods/ibus-anthy { };
967+
962968 biosdevname = callPackage ../tools/networking/biosdevname { };
963969
964970 clamav = callPackage ../tools/security/clamav { };
@@ -4974,8 +4980,6 @@ let
49744980
49754981 hyenae = callPackage ../tools/networking/hyenae { };
49764982
4977− ibus = callPackage ../development/libraries/ibus { };
4978−
49794983 icmake = callPackage ../development/tools/build-managers/icmake { };
49804984
49814985 iconnamingutils = callPackage ../development/tools/misc/icon-naming-utils {