Merge pull request #31094 from yegortimoshenko/ibus/update

ibus: 1.5.16 -> 1.5.17, fix
This commit is contained in:
Yegor Timoshenko 2017-12-31 21:23:05 +03:00 committed by GitHub
commit d3e821156e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 106 additions and 91 deletions

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, dbus_glib, gnome3 ? null, glib, libxml2 { stdenv, fetchurl, pkgconfig, dbus_glib, gnome3 ? null, glib, libxml2
, intltool, polkit, orbit, withGtk ? false }: , intltool, polkit, orbit, python, withGtk ? false }:
assert withGtk -> (gnome3 != null); assert withGtk -> (gnome3 != null);
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
sha256 = "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr"; sha256 = "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr";
}; };
buildInputs = [ libxml2 polkit orbit ] ++ stdenv.lib.optional withGtk gnome3.gtk; buildInputs = [ libxml2 polkit orbit python ] ++ stdenv.lib.optional withGtk gnome3.gtk;
propagatedBuildInputs = [ glib dbus_glib ]; propagatedBuildInputs = [ glib dbus_glib ];
nativeBuildInputs = [ pkgconfig intltool ]; nativeBuildInputs = [ pkgconfig intltool ];

View file

@ -1,5 +1,4 @@
make_gobject_introspection_find_gir_files() { make_gobject_introspection_find_gir_files() {
# required for .typelib files, eg mypaint git version # required for .typelib files, eg mypaint git version
if [ -d "$1/lib/girepository-1.0" ]; then if [ -d "$1/lib/girepository-1.0" ]; then
addToSearchPath GI_TYPELIB_PATH $1/lib/girepository-1.0 addToSearchPath GI_TYPELIB_PATH $1/lib/girepository-1.0
@ -13,9 +12,16 @@ make_gobject_introspection_find_gir_files() {
addEnvHooks "$hostOffset" make_gobject_introspection_find_gir_files addEnvHooks "$hostOffset" make_gobject_introspection_find_gir_files
giDiscoverSelf() {
if [ -d "$prefix/lib/girepository-1.0" ]; then
addToSearchPath GI_TYPELIB_PATH $prefix/lib/girepository-1.0
fi
}
preFixupHooks+=(giDiscoverSelf)
_multioutMoveGlibGir() { _multioutMoveGlibGir() {
moveToOutput share/gir-1.0 "${!outputDev}" moveToOutput share/gir-1.0 "${!outputDev}"
} }
preFixupHooks+=(_multioutMoveGlibGir) preFixupHooks+=(_multioutMoveGlibGir)

View file

@ -1,129 +1,138 @@
{ stdenv, fetchurl, wrapGAppsHook { stdenv, fetchurl, fetchFromGitHub, autoreconfHook, gconf, intltool, makeWrapper, pkgconfig
, intltool, isocodes, pkgconfig , vala, wrapGAppsHook, atk, dbus, dconf ? null, glib, gdk_pixbuf, gobjectIntrospection, gtk2
, python3 , gtk3, gtk_doc, isocodes, python3, json_glib, libnotify ? null, enablePythonLibrary ? true
, gtk2, gtk3, atk, dconf, glib, json_glib , enableUI ? true, withWayland ? false, libxkbcommon ? null, wayland ? null }:
, dbus, libnotify, gobjectIntrospection, wayland
}: assert withWayland -> wayland != null && libxkbcommon != null;
with stdenv.lib;
let let
emojiData = let emojiSrcs = {
srcs = { data = fetchurl {
data = fetchurl { url = "http://unicode.org/Public/emoji/5.0/emoji-data.txt";
url = "http://unicode.org/Public/emoji/5.0/emoji-data.txt"; sha256 = "11jfz5rrvyc2ixliqfcjgmch4cn9mfy0x96qnpfcyz5fy1jvfyxf";
sha256 = "11jfz5rrvyc2ixliqfcjgmch4cn9mfy0x96qnpfcyz5fy1jvfyxf";
};
sequences = fetchurl {
url = "http://unicode.org/Public/emoji/5.0/emoji-sequences.txt";
sha256 = "09bii7f5mmladg0kl3n80fa9qaix6bv5ylm92x52j7wygzv0szb1";
};
variation-sequences = fetchurl {
url = "http://unicode.org/Public/emoji/5.0/emoji-variation-sequences.txt";
sha256 = "1wlg4gbq7spmpppjfy5zdl82sj0hc836p8gljgfrjmwsjgybq286";
};
zwj-sequences = fetchurl {
url = "http://unicode.org/Public/emoji/5.0/emoji-zwj-sequences.txt";
sha256 = "16gvzv76mjv9g81lm1m6cr3rpfqyn2k4hb9a62xd329252dhl25q";
};
test = fetchurl {
url = "http://unicode.org/Public/emoji/5.0/emoji-test.txt";
sha256 = "031qk2v8xdnba7hfinmgrmpglc9l8ll2hds6mw885p0hngdb3dgw";
};
}; };
in stdenv.mkDerivation { sequences = fetchurl {
url = "http://unicode.org/Public/emoji/5.0/emoji-sequences.txt";
sha256 = "09bii7f5mmladg0kl3n80fa9qaix6bv5ylm92x52j7wygzv0szb1";
};
variation-sequences = fetchurl {
url = "http://unicode.org/Public/emoji/5.0/emoji-variation-sequences.txt";
sha256 = "1wlg4gbq7spmpppjfy5zdl82sj0hc836p8gljgfrjmwsjgybq286";
};
zwj-sequences = fetchurl {
url = "http://unicode.org/Public/emoji/5.0/emoji-zwj-sequences.txt";
sha256 = "16gvzv76mjv9g81lm1m6cr3rpfqyn2k4hb9a62xd329252dhl25q";
};
test = fetchurl {
url = "http://unicode.org/Public/emoji/5.0/emoji-test.txt";
sha256 = "031qk2v8xdnba7hfinmgrmpglc9l8ll2hds6mw885p0hngdb3dgw";
};
};
emojiData = stdenv.mkDerivation {
name = "emoji-data-5.0"; name = "emoji-data-5.0";
unpackPhase = ":"; unpackPhase = ":";
dontBuild = true; installPhase = ''
installPhase = with stdenv.lib; ''
mkdir $out mkdir $out
${builtins.toString (flip mapAttrsToList srcs (k: v: '' ${builtins.toString (flip mapAttrsToList emojiSrcs (k: v: "cp ${v} $out/emoji-${k}.txt;"))}
cp ${v} $out/emoji-${k}.txt
''))}
''; '';
}; };
cldrEmojiAnnotation = stdenv.mkDerivation rec { cldrEmojiAnnotation = stdenv.mkDerivation rec {
name = "cldr-emoji-annotation-${version}"; name = "cldr-emoji-annotation-${version}";
version = "31.0.1_1"; version = "31.90.0_1";
src = fetchurl { src = fetchFromGitHub {
url = "https://github.com/fujiwarat/cldr-emoji-annotation/releases/download/${version}/${name}.tar.gz"; owner = "fujiwarat";
sha256 = "1a3qzsab7vzjqpdialp1g8ppr21x05v0ph8ngyq9pyjkx4vzcdi7"; repo = "cldr-emoji-annotation";
rev = version;
sha256 = "1vsj32bg8ab4d80rz0fxy6sj2lv31inzyjnddjm079bnvlaf2kih";
}; };
nativeBuildInputs = [ autoreconfHook ];
}; };
pyEnv = python3.buildEnv.override { python3Runtime = python3.withPackages (ps: with ps; [ pygobject3 ]);
extraLibs = [ python3.pkgs.pygobject3 ]; python3BuildEnv = python3.buildEnv.override {
# ImportError: No module named site # ImportError: No module named site
postBuild = '' postBuild = ''
makeWrapper '${glib.dev}/bin/glib-genmarshal' "$out"/bin/glib-genmarshal \ makeWrapper ${glib.dev}/bin/gdbus-codegen $out/bin/gdbus-codegen --unset PYTHONPATH
--unset PYTHONPATH makeWrapper ${glib.dev}/bin/glib-genmarshal $out/bin/glib-genmarshal --unset PYTHONPATH
makeWrapper ${glib.dev}/bin/glib-mkenums $out/bin/glib-mkenums --unset PYTHONPATH
''; '';
}; };
in stdenv.mkDerivation rec { in
name = "ibus-${version}";
version = "1.5.16";
src = fetchurl { stdenv.mkDerivation rec {
url = "https://github.com/ibus/ibus/releases/download/${version}/${name}.tar.gz"; name = "ibus-${version}";
sha256 = "07py16jb81kd7vkqhcia9cb2avsbg5jswp2kzf0k4bprwkxppd9n"; version = "1.5.17";
src = fetchFromGitHub {
owner = "ibus";
repo = "ibus";
rev = version;
sha256 = "09mrj9d8qpl9cbylg1zx8c3ymc5gdy4jrf6zs125wjz0b574g5av";
}; };
postPatch = '' postPatch = ''
# These paths will be set in the wrapper. substituteInPlace setup/ibus-setup.in --subst-var-by PYTHON ${python3Runtime.interpreter}
sed -e "/export IBUS_DATAROOTDIR/ s/^.*$//" \ substituteInPlace data/dconf/Makefile.am --replace "dconf update" true
-e "/export IBUS_LIBEXECDIR/ s/^.*$//" \ substituteInPlace configure.ac --replace '$python2dir/ibus' $out/${python3.sitePackages}/ibus
-e "/export IBUS_LOCALEDIR/ s/^.*$//" \ echo \#!${stdenv.shell} > data/dconf/make-dconf-override-db.sh
-e "/export IBUS_PREFIX/ s/^.*$//" \ cp ${gtk_doc}/share/gtk-doc/data/gtk-doc.make .
-i "setup/ibus-setup.in"
''; '';
preAutoreconf = "touch ChangeLog";
preConfigure = "intltoolize";
configureFlags = [ configureFlags = [
"--disable-gconf" "--disable-gconf"
"--enable-dconf"
"--disable-memconf" "--disable-memconf"
"--enable-ui" (enableFeature (dconf != null) "dconf")
"--enable-python-library" (enableFeature (libnotify != null) "libnotify")
(enableFeature withWayland "wayland")
(enableFeature enablePythonLibrary "python-library")
(enableFeature enableUI "ui")
"--with-unicode-emoji-dir=${emojiData}" "--with-unicode-emoji-dir=${emojiData}"
"--with-emoji-annotation-dir=${cldrEmojiAnnotation}/share/unicode/cldr/common/annotations" "--with-emoji-annotation-dir=${cldrEmojiAnnotation}/share/unicode/cldr/common/annotations"
]; ];
buildInputs = [ nativeBuildInputs = [
pyEnv autoreconfHook
intltool isocodes pkgconfig gconf
gtk2 gtk3 dconf gtk_doc
json_glib intltool
dbus libnotify gobjectIntrospection wayland makeWrapper
pkgconfig
python3BuildEnv
vala
wrapGAppsHook
]; ];
propagatedBuildInputs = [ glib ]; propagatedBuildInputs = [ glib ];
nativeBuildInputs = [ wrapGAppsHook ]; buildInputs = [
dbus
outputs = [ "out" "dev" ]; dconf
gdk_pixbuf
gobjectIntrospection
gtk2
gtk3
isocodes
json_glib
libnotify
] ++ optionals withWayland [
libxkbcommon
wayland
];
enableParallelBuilding = true; enableParallelBuilding = true;
preConfigure = ''
# Fix hard-coded installation paths, so make does not try to overwrite our
# Python installation.
sed -e "/py2overridesdir=/ s|=.*$|=$out/lib/${python3.libPrefix}|" \
-e "/pyoverridesdir=/ s|=.*$|=$out/lib/${python3.libPrefix}|" \
-e "/PYTHON2_LIBDIR/ s|=.*|=$out/lib/${python3.libPrefix}|" \
-i configure
# Don't try to generate a system-wide dconf database; it wouldn't work.
substituteInPlace data/dconf/Makefile.in --replace "dconf update" "echo"
'';
doInstallCheck = true; doInstallCheck = true;
installCheckPhase = "$out/bin/ibus version"; installCheckPhase = "$out/bin/ibus version";
postInstall = '' meta = {
moveToOutput "bin/ibus-setup" "$dev"
'';
meta = with stdenv.lib; {
homepage = https://github.com/ibus/ibus; homepage = https://github.com/ibus/ibus;
description = "Intelligent Input Bus for Linux / Unix OS"; description = "Intelligent Input Bus, input method framework";
license = licenses.lgpl21Plus;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = [ maintainers.ttuegel ]; maintainers = with maintainers; [ ttuegel yegortimoshenko ];
}; };
} }

View file

@ -1550,7 +1550,7 @@ with pkgs;
skk-dicts = callPackage ../tools/inputmethods/skk/skk-dicts { }; skk-dicts = callPackage ../tools/inputmethods/skk/skk-dicts { };
ibus = callPackage ../tools/inputmethods/ibus { ibus = callPackage ../tools/inputmethods/ibus {
inherit (gnome3) dconf glib; inherit (gnome3) dconf gconf glib;
}; };
ibus-qt = callPackage ../tools/inputmethods/ibus/ibus-qt.nix { }; ibus-qt = callPackage ../tools/inputmethods/ibus/ibus-qt.nix { };