nixpkgs/pkgs/tools/inputmethods/ibus/default.nix

72 lines
2.1 KiB
Nix
Raw Normal View History

2016-02-27 00:30:01 +01:00
{ stdenv, fetchurl, makeWrapper
, intltool, isocodes, pkgconfig
, python3, pygobject3
, gtk2, gtk3, atk, dconf, glib
, dbus, libnotify, gobjectIntrospection, wayland
}:
2014-01-25 17:05:33 +01:00
stdenv.mkDerivation rec {
name = "ibus-${version}";
2016-02-27 00:30:01 +01:00
version = "1.5.13";
2014-01-25 17:05:33 +01:00
src = fetchurl {
url = "https://github.com/ibus/ibus/releases/download/${version}/${name}.tar.gz";
2016-02-27 00:30:01 +01:00
sha256 = "1wd5azlsgdih8qw6gi15rv130s6d90846n3r1ccwmp6z882xhwzd";
2014-01-25 17:05:33 +01:00
};
2016-02-27 00:30:01 +01: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"
];
2014-01-25 17:05:33 +01:00
buildInputs = [
2016-02-27 00:30:01 +01:00
python3 pygobject3
intltool isocodes pkgconfig
gtk2 gtk3 dconf glib
dbus libnotify gobjectIntrospection wayland
2014-01-25 17:05:33 +01:00
];
2016-02-27 00:30:01 +01:00
nativeBuildInputs = [ makeWrapper ];
preConfigure = ''
2016-02-27 00:30:01 +01: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.
substituteInPlace data/dconf/Makefile.in --replace "dconf update" "echo"
2014-07-30 22:38:23 +02:00
'';
2014-01-25 17:05:33 +01:00
preFixup = ''
2016-02-27 00:30:01 +01: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 17:05:33 +01:00
done
'';
2016-02-27 00:30:01 +01:00
meta = with stdenv.lib; {
homepage = https://github.com/ibus/ibus;
2014-01-25 17:05:33 +01:00
description = "Intelligent Input Bus for Linux / Unix OS";
2016-02-27 00:30:01 +01:00
platforms = platforms.linux;
maintainers = [ maintainers.ttuegel ];
2014-01-25 17:05:33 +01:00
};
}