2016-02-26 23:30:01 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
|
|
|
, intltool, isocodes, pkgconfig
|
|
|
|
, python3, pygobject3
|
2016-09-30 00:57:51 +00:00
|
|
|
, gtk2, gtk3, atk, dconf, glib, json_glib
|
2016-02-26 23:30:01 +00:00
|
|
|
, dbus, libnotify, gobjectIntrospection, wayland
|
2016-09-30 00:57:51 +00:00
|
|
|
, nodePackages
|
2016-02-26 23:30:01 +00:00
|
|
|
}:
|
2014-01-25 16:05:33 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ibus-${version}";
|
2016-09-30 00:57:51 +00:00
|
|
|
version = "1.5.14";
|
2014-01-25 16:05:33 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-05-28 20:03:35 +00:00
|
|
|
url = "https://github.com/ibus/ibus/releases/download/${version}/${name}.tar.gz";
|
2016-09-30 00:57:51 +00:00
|
|
|
sha256 = "0g4x02d7j5w1lfn4zvmzsq93h17lajgn9d7hlvr6pws28vz40ax4";
|
2014-01-25 16:05:33 +00:00
|
|
|
};
|
|
|
|
|
2016-02-26 23:30:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
# These paths will be set in the wrapper.
|
|
|
|
sed -e "/export IBUS_DATAROOTDIR/ s/^.*$//" \
|
|
|
|
-e "/export IBUS_LIBEXECDIR/ s/^.*$//" \
|
|
|
|
-e "/export IBUS_LOCALEDIR/ s/^.*$//" \
|
|
|
|
-e "/export IBUS_PREFIX/ s/^.*$//" \
|
|
|
|
-i "setup/ibus-setup.in"
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-gconf"
|
|
|
|
"--enable-dconf"
|
|
|
|
"--disable-memconf"
|
|
|
|
"--enable-ui"
|
|
|
|
"--enable-python-library"
|
2016-09-30 00:57:51 +00:00
|
|
|
"--with-emoji-json-file=${nodePackages.emojione}/lib/node_modules/emojione/emoji.json"
|
2016-02-26 23:30:01 +00:00
|
|
|
];
|
2014-01-25 16:05:33 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2016-02-26 23:30:01 +00:00
|
|
|
python3 pygobject3
|
|
|
|
intltool isocodes pkgconfig
|
2016-08-22 03:11:18 +00:00
|
|
|
gtk2 gtk3 dconf
|
2016-09-30 00:57:51 +00:00
|
|
|
json_glib
|
2016-02-26 23:30:01 +00:00
|
|
|
dbus libnotify gobjectIntrospection wayland
|
2014-01-25 16:05:33 +00:00
|
|
|
];
|
|
|
|
|
2016-08-22 03:11:18 +00:00
|
|
|
propagatedBuildInputs = [ glib ];
|
|
|
|
|
2016-02-26 23:30:01 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2017-03-20 14:18:56 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2015-05-28 20:03:35 +00:00
|
|
|
preConfigure = ''
|
2016-02-26 23:30:01 +00:00
|
|
|
# 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.
|
2015-05-28 20:03:35 +00:00
|
|
|
substituteInPlace data/dconf/Makefile.in --replace "dconf update" "echo"
|
2014-07-30 20:38:23 +00:00
|
|
|
'';
|
2014-01-25 16:05:33 +00:00
|
|
|
|
2014-04-05 13:51:42 +00:00
|
|
|
preFixup = ''
|
2016-02-26 23:30:01 +00:00
|
|
|
for f in "$out/bin"/*; do #*/
|
|
|
|
wrapProgram "$f" \
|
|
|
|
--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"
|
2014-01-25 16:05:33 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2016-09-30 00:57:51 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = "$out/bin/ibus version";
|
|
|
|
|
2016-02-26 23:30:01 +00:00
|
|
|
meta = with stdenv.lib; {
|
2015-05-28 20:03:35 +00:00
|
|
|
homepage = https://github.com/ibus/ibus;
|
2014-01-25 16:05:33 +00:00
|
|
|
description = "Intelligent Input Bus for Linux / Unix OS";
|
2016-02-26 23:30:01 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.ttuegel ];
|
2014-01-25 16:05:33 +00:00
|
|
|
};
|
|
|
|
}
|