diff options
Diffstat (limited to 'pkgs/tools/inputmethods')
5 files changed, 37 insertions, 62 deletions
diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix index 2494c75a06c6..50059e9477a9 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix @@ -1,6 +1,5 @@ -{ stdenv, fetchFromGitHub, makeWrapper, ibus, anthy, intltool -, pkgconfig, glib, gobjectIntrospection -, python3, pygobject3, gtk3, libtool, automake, autoconf +{ stdenv, fetchurl, intltool, pkgconfig +, anthy, ibus, glib, gobjectIntrospection, gtk3, python3, pygobject3 }: stdenv.mkDerivation rec { @@ -16,28 +15,20 @@ stdenv.mkDerivation rec { 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 - python3 pygobject3 gtk3 libtool automake autoconf + anthy glib gobjectIntrospection gtk3 ibus python3 pygobject3 ]; + nativeBuildInputs = [ intltool pkgconfig ]; + postFixup = '' substituteInPlace $out/share/ibus/component/anthy.xml --replace \$\{exec_prefix\} $out - 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 = fetchFromGitHub { - owner = "ibus"; - repo = "ibus-anthy"; - rev = version; - sha256 = "1laxwpnhgihv4dz5cgcz6d0a0880r93n7039ciz1m53hdzapwi4a"; + src = fetchurl { + url = "https://github.com/ibus/ibus-anthy/releases/download/${version}/${name}.tar.gz"; + sha256 = "1aj7vnfky7izl23xyjky78z3qas3q72l3kr8dnql2lnivsrb8q1y"; }; } diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix index ffffeefa9b60..1ada62580dbc 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix @@ -1,5 +1,4 @@ -{ stdenv, fetchurl, makeWrapper -, intltool, pkgconfig +{ stdenv, fetchurl, intltool, pkgconfig , gtk3, ibus, libhangul, librsvg, python3, pygobject3 }: @@ -9,24 +8,16 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/choehwanjin/ibus-hangul/releases/download/${version}/${name}.tar.gz"; - sha256 = null; + sha256 = "120p9w7za6hi521hz8q235fkl4i3p1qqr8nqm4a3kxr0pcq40bd2"; }; buildInputs = [ gtk3 ibus libhangul python3 pygobject3 ]; - nativeBuildInputs = [ intltool makeWrapper pkgconfig ]; - - 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 - ''; + nativeBuildInputs = [ intltool pkgconfig ]; meta = with stdenv.lib; { isIbusEngine = true; - description = "Ibus Hangul engine."; + description = "Ibus Hangul engine"; homepage = https://github.com/choehwanjin/ibus-hangul; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix index 30329c4306f2..81bfffb25464 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix @@ -1,5 +1,7 @@ -{ stdenv, fetchFromGitHub, ibus, m17n_lib, m17n_db, automake, autoconf, - gettext, libtool, pkgconfig, python, pythonPackages }: +{ stdenv, fetchFromGitHub +, automake, autoconf, libtool, pkgconfig +, ibus, m17n_lib, m17n_db, gettext, python3, pygobject3 +}: stdenv.mkDerivation rec { name = "ibus-m17n-${version}"; @@ -12,18 +14,20 @@ stdenv.mkDerivation rec { sha256 = "1n0bvgc4jyksgvzrw5zs2pxcpxcn3gcc0j2kasbznm34fpv3frsr"; }; - buildInputs = [ - ibus m17n_lib m17n_db automake autoconf gettext - libtool pkgconfig python pythonPackages.pygobject3 + buildInputs = [ + ibus m17n_lib m17n_db gettext + python3 pygobject3 ]; + nativeBuildInputs = [ automake autoconf libtool pkgconfig ]; + preConfigure = '' autoreconf --verbose --force --install ''; meta = with stdenv.lib; { isIbusEngine = true; - description = "m17n engine for ibus."; + description = "m17n engine for ibus"; homepage = https://github.com.com/ibus/ibus-m17n; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix index 3d78a8ec69e7..b44bea9119a2 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, makeWrapper, ibus, pkgconfig, python3, pygobject3 -, gtk3, atk, dconf, gobjectIntrospection }: +{ stdenv, fetchurl, pkgconfig +, gtk3, dconf, gobjectIntrospection, ibus, python3, pygobject3 }: stdenv.mkDerivation rec { name = "ibus-table-${version}"; @@ -25,29 +25,10 @@ stdenv.mkDerivation rec { ''; buildInputs = [ - gtk3 dconf gobjectIntrospection - ibus - pkgconfig - python3 pygobject3 + dconf gtk3 gobjectIntrospection ibus python3 pygobject3 ]; - nativeBuildInputs = [ makeWrapper ]; - - preFixup = '' - for prog in "$out/bin"/*; do #*/ - wrapProgram "$prog" \ - --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \ - --prefix PYTHONPATH : "$PYTHONPATH" \ - --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \ - --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" - done - - for prog in "$out/libexec"/*; do #*/ - wrapProgram "$prog" \ - --prefix PYTHONPATH : "$PYTHONPATH" \ - --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" - done - ''; + nativeBuildInputs = [ pkgconfig ]; meta = with stdenv.lib; { isIbusEngine = true; diff --git a/pkgs/tools/inputmethods/ibus/wrapper.nix b/pkgs/tools/inputmethods/ibus/wrapper.nix index 3bccad1cc0c9..632f46f81e94 100644 --- a/pkgs/tools/inputmethods/ibus/wrapper.nix +++ b/pkgs/tools/inputmethods/ibus/wrapper.nix @@ -1,11 +1,15 @@ -{ stdenv, runCommand, ibus, lndir, makeWrapper, plugins, hicolor_icon_theme }: +{ stdenv, runCommand, makeWrapper, lndir +, dconf, hicolor_icon_theme, ibus, librsvg, plugins +}: let name = "ibus-with-plugins-" + (builtins.parseDrvName ibus.name).version; env = { + buildInputs = [ ibus ] ++ plugins; nativeBuildInputs = [ lndir makeWrapper ]; propagatedUserEnvPackages = [ hicolor_icon_theme ]; paths = [ ibus ] ++ plugins; + inherit (ibus) meta; }; command = '' for dir in bin etc lib libexec share; do @@ -19,7 +23,9 @@ let for prog in ibus ibus-daemon ibus-setup; do wrapProgram "$out/bin/$prog" \ - --suffix XDG_DATA_DIRS : "${hicolor_icon_theme}/share" \ + --prefix GDK_PIXBUF_MODULE_FILE : ${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \ + --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" \ --set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \ --set IBUS_DATAROOTDIR "$out/share" \ --set IBUS_LIBEXECDIR "$out/libexec" \ @@ -29,7 +35,9 @@ let --set IBUS_TABLE_DATA_DIR "$out/share" \ --set IBUS_TABLE_LIB_LOCATION "$out/libexec" \ --set IBUS_TABLE_LOCATION "$out/share/ibus-table" \ - --set IBUS_TABLE_DEBUG_LEVEL 1 + --prefix PYTHONPATH : "$PYTHONPATH" \ + --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \ + --suffix XDG_DATA_DIRS : "${hicolor_icon_theme}/share" done ''; in |