2017-03-25 20:53:01 +00:00
|
|
|
{ stdenv, fetchurl, wrapGAppsHook
|
2016-02-26 23:30:01 +00:00
|
|
|
, intltool, isocodes, pkgconfig
|
2017-03-25 20:53:01 +00:00
|
|
|
, python3
|
2016-09-30 01:57:51 +01:00
|
|
|
, gtk2, gtk3, atk, dconf, glib, json_glib
|
2016-02-26 23:30:01 +00:00
|
|
|
, dbus, libnotify, gobjectIntrospection, wayland
|
|
|
|
}:
|
2014-01-25 16:05:33 +00:00
|
|
|
|
2017-05-23 03:09:48 +01:00
|
|
|
let
|
|
|
|
emojiData = let
|
|
|
|
srcs = {
|
|
|
|
data = fetchurl {
|
|
|
|
url = "http://unicode.org/Public/emoji/5.0/emoji-data.txt";
|
2017-09-14 12:11:16 +01:00
|
|
|
sha256 = "11jfz5rrvyc2ixliqfcjgmch4cn9mfy0x96qnpfcyz5fy1jvfyxf";
|
2017-05-23 03:09:48 +01:00
|
|
|
};
|
|
|
|
sequences = fetchurl {
|
|
|
|
url = "http://unicode.org/Public/emoji/5.0/emoji-sequences.txt";
|
2017-09-14 12:11:16 +01:00
|
|
|
sha256 = "09bii7f5mmladg0kl3n80fa9qaix6bv5ylm92x52j7wygzv0szb1";
|
2017-05-23 03:09:48 +01:00
|
|
|
};
|
|
|
|
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";
|
2017-09-14 12:11:16 +01:00
|
|
|
sha256 = "16gvzv76mjv9g81lm1m6cr3rpfqyn2k4hb9a62xd329252dhl25q";
|
2017-05-23 03:09:48 +01:00
|
|
|
};
|
|
|
|
test = fetchurl {
|
|
|
|
url = "http://unicode.org/Public/emoji/5.0/emoji-test.txt";
|
2017-09-14 12:11:16 +01:00
|
|
|
sha256 = "031qk2v8xdnba7hfinmgrmpglc9l8ll2hds6mw885p0hngdb3dgw";
|
2017-05-23 03:09:48 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "emoji-data-5.0";
|
|
|
|
unpackPhase = ":";
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = with stdenv.lib; ''
|
|
|
|
mkdir $out
|
|
|
|
${builtins.toString (flip mapAttrsToList srcs (k: v: ''
|
|
|
|
cp ${v} $out/emoji-${k}.txt
|
|
|
|
''))}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
cldrEmojiAnnotation = stdenv.mkDerivation rec {
|
|
|
|
name = "cldr-emoji-annotation-${version}";
|
|
|
|
version = "31.0.1_1";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/fujiwarat/cldr-emoji-annotation/releases/download/${version}/${name}.tar.gz";
|
|
|
|
sha256 = "1a3qzsab7vzjqpdialp1g8ppr21x05v0ph8ngyq9pyjkx4vzcdi7";
|
|
|
|
};
|
|
|
|
};
|
2017-08-28 19:58:49 +01:00
|
|
|
pyEnv = python3.buildEnv.override {
|
|
|
|
extraLibs = [ python3.pkgs.pygobject3 ];
|
2017-10-01 10:56:08 +01:00
|
|
|
|
|
|
|
# ImportError: No module named site
|
|
|
|
postBuild = ''
|
|
|
|
makeWrapper '${glib.dev}/bin/glib-genmarshal' "$out"/bin/glib-genmarshal \
|
|
|
|
--unset PYTHONPATH
|
|
|
|
'';
|
2017-08-28 19:58:49 +01:00
|
|
|
};
|
2017-05-23 03:09:48 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
2014-01-25 16:05:33 +00:00
|
|
|
name = "ibus-${version}";
|
2017-05-23 03:09:48 +01:00
|
|
|
version = "1.5.16";
|
2014-01-25 16:05:33 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-05-28 21:03:35 +01:00
|
|
|
url = "https://github.com/ibus/ibus/releases/download/${version}/${name}.tar.gz";
|
2017-05-23 03:09:48 +01:00
|
|
|
sha256 = "07py16jb81kd7vkqhcia9cb2avsbg5jswp2kzf0k4bprwkxppd9n";
|
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"
|
2017-05-23 03:09:48 +01:00
|
|
|
"--with-unicode-emoji-dir=${emojiData}"
|
|
|
|
"--with-emoji-annotation-dir=${cldrEmojiAnnotation}/share/unicode/cldr/common/annotations"
|
2016-02-26 23:30:01 +00:00
|
|
|
];
|
2014-01-25 16:05:33 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2017-08-28 19:58:49 +01:00
|
|
|
pyEnv
|
2016-02-26 23:30:01 +00:00
|
|
|
intltool isocodes pkgconfig
|
2016-08-22 04:11:18 +01:00
|
|
|
gtk2 gtk3 dconf
|
2016-09-30 01:57:51 +01:00
|
|
|
json_glib
|
2016-02-26 23:30:01 +00:00
|
|
|
dbus libnotify gobjectIntrospection wayland
|
2014-01-25 16:05:33 +00:00
|
|
|
];
|
|
|
|
|
2017-08-28 19:58:49 +01:00
|
|
|
propagatedBuildInputs = [ glib ];
|
2016-08-22 04:11:18 +01:00
|
|
|
|
2017-08-28 19:58:49 +01:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook ];
|
2016-02-26 23:30:01 +00:00
|
|
|
|
2017-03-20 14:18:56 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2017-03-25 20:53:01 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-05-28 21:03:35 +01: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 21:03:35 +01:00
|
|
|
substituteInPlace data/dconf/Makefile.in --replace "dconf update" "echo"
|
2014-07-30 21:38:23 +01:00
|
|
|
'';
|
2014-01-25 16:05:33 +00:00
|
|
|
|
2016-09-30 01:57:51 +01:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = "$out/bin/ibus version";
|
|
|
|
|
2017-09-27 19:23:38 +01:00
|
|
|
postInstall = ''
|
|
|
|
moveToOutput "bin/ibus-setup" "$dev"
|
|
|
|
'';
|
|
|
|
|
2016-02-26 23:30:01 +00:00
|
|
|
meta = with stdenv.lib; {
|
2015-05-28 21:03:35 +01: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
|
|
|
};
|
|
|
|
}
|