diff options
author | lethalman <lucabru@src.gnome.org> | 2015-03-12 14:35:23 +0100 |
---|---|---|
committer | lethalman <lucabru@src.gnome.org> | 2015-03-12 14:35:23 +0100 |
commit | 14ed261fc741b803f21ec54111cfe04c72680f4e (patch) | |
tree | 41b569dcdff3af17b17e677e162b8001bf49adcf | |
parent | 6cd99a4eb266d3857f3b7506df28d7859a2c2f6c (diff) | |
parent | 2e8cbfbc58fffd35a19082f828adf5d4132a4207 (diff) |
Merge pull request #6765 from gebner/ibus-plugins
Add ibus-qt and ibus-anthy.
-rw-r--r-- | lib/maintainers.nix | 1 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/ibus.nix | 51 | ||||
-rw-r--r-- | pkgs/tools/inputmethods/ibus-anthy/default.nix | 29 | ||||
-rw-r--r-- | pkgs/tools/inputmethods/ibus-qt/default.nix | 25 | ||||
-rw-r--r-- | pkgs/tools/inputmethods/ibus/default.nix (renamed from pkgs/development/libraries/ibus/default.nix) | 0 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
7 files changed, 113 insertions, 2 deletions
diff --git a/lib/maintainers.nix b/lib/maintainers.nix index a25b20667ca7c..cee9f0023e245 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -80,6 +80,7 @@ garbas = "Rok Garbas <rok@garbas.si>"; garrison = "Jim Garrison <jim@garrison.cc>"; gavin = "Gavin Rogers <gavin@praxeology.co.uk>"; + gebner = "Gabriel Ebner <gebner@gebner.org>"; globin = "Robin Gloster <robin@glob.in>"; goibhniu = "Cillian de RĂ³iste <cillian.deroiste@gmail.com>"; gridaphobe = "Eric Seidel <eric@seidel.io>"; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index de86f11c6bbe0..23809796878f4 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -60,6 +60,7 @@ ./programs/dconf.nix ./programs/environment.nix ./programs/info.nix + ./programs/ibus.nix ./programs/light.nix ./programs/nano.nix ./programs/screen.nix diff --git a/nixos/modules/programs/ibus.nix b/nixos/modules/programs/ibus.nix new file mode 100644 index 0000000000000..b8702a743d8ae --- /dev/null +++ b/nixos/modules/programs/ibus.nix @@ -0,0 +1,51 @@ +{ 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 ]; + + 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/pkgs/tools/inputmethods/ibus-anthy/default.nix b/pkgs/tools/inputmethods/ibus-anthy/default.nix new file mode 100644 index 0000000000000..df0790877acdf --- /dev/null +++ b/pkgs/tools/inputmethods/ibus-anthy/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, makeWrapper, ibus, anthy, intltool, pkgconfig, glib, gobjectIntrospection, python, pythonPackages }: + +let version = "1.5.4"; +in stdenv.mkDerivation { + name = "ibus-anthy-${version}"; + + meta = with stdenv.lib; { + description = "IBus interface to the anthy input method"; + homepace = https://code.google.com/p/ibus/; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ gebner ]; + }; + + buildInputs = [ makeWrapper ibus anthy intltool pkgconfig glib gobjectIntrospection python pythonPackages.pygobject3 ]; + + postFixup = '' + for file in "$out"/libexec/*; do + wrapProgram "$file" \ + --prefix PYTHONPATH : $PYTHONPATH \ + --prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH:$out/lib/girepository-1.0 + done + ''; + + src = fetchurl { + url = "https://ibus.googlecode.com/files/ibus-anthy-${version}.tar.gz"; + sha256 = "4c0a8b88a2c547e72173a7d682d82797f6c65fe712abe5f3b89495d4eec7b031"; + }; +} diff --git a/pkgs/tools/inputmethods/ibus-qt/default.nix b/pkgs/tools/inputmethods/ibus-qt/default.nix new file mode 100644 index 0000000000000..c538d36ec591f --- /dev/null +++ b/pkgs/tools/inputmethods/ibus-qt/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl, ibus, cmake, pkgconfig, qt4, icu, doxygen }: + +stdenv.mkDerivation rec { + name = "ibus-qt-${version}"; + version = "1.3.2"; + + src = fetchurl { + url = "http://ibus.googlecode.com/files/${name}-Source.tar.gz"; + sha256 = "070c8ef4e6c74eddf7ddf4385936aed730c2dfe2160162e5c56b5158d1061a76"; + }; + + buildInputs = [ + ibus cmake pkgconfig qt4 icu doxygen + ]; + + cmakeFlags = [ "-DQT_PLUGINS_DIR=lib/qt4/plugins" ]; + + meta = with stdenv.lib; { + homepage = https://code.google.com/p/ibus/; + description = "Qt4 interface to the ibus input method"; + platforms = platforms.linux; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ gebner ]; + }; +} diff --git a/pkgs/development/libraries/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix index 6b426169a708e..6b426169a708e 100644 --- a/pkgs/development/libraries/ibus/default.nix +++ b/pkgs/tools/inputmethods/ibus/default.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3115081638fe0..f48b9f15a45b5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -959,6 +959,12 @@ let anthy = callPackage ../tools/inputmethods/anthy { }; + ibus = callPackage ../tools/inputmethods/ibus { }; + + ibus-qt = callPackage ../tools/inputmethods/ibus-qt { }; + + ibus-anthy = callPackage ../tools/inputmethods/ibus-anthy { }; + biosdevname = callPackage ../tools/networking/biosdevname { }; clamav = callPackage ../tools/security/clamav { }; @@ -4974,8 +4980,6 @@ let hyenae = callPackage ../tools/networking/hyenae { }; - ibus = callPackage ../development/libraries/ibus { }; - icmake = callPackage ../development/tools/build-managers/icmake { }; iconnamingutils = callPackage ../development/tools/misc/icon-naming-utils { |