2019-11-07 19:01:21 +01:00
|
|
|
{ stdenv
|
|
|
|
, substituteAll
|
|
|
|
, fetchurl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, gettext
|
|
|
|
, makeWrapper
|
|
|
|
, pkgconfig
|
|
|
|
, vala
|
|
|
|
, wrapGAppsHook
|
|
|
|
, dbus
|
|
|
|
, dconf ? null
|
|
|
|
, glib
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk2
|
|
|
|
, gtk3
|
|
|
|
, gtk-doc
|
|
|
|
, isocodes
|
|
|
|
, python3
|
|
|
|
, json-glib
|
|
|
|
, libnotify ? null
|
|
|
|
, enablePython2Library ? false
|
|
|
|
, enableUI ? true
|
|
|
|
, withWayland ? false
|
|
|
|
, libxkbcommon ? null
|
|
|
|
, wayland ? null
|
|
|
|
, buildPackages
|
|
|
|
, runtimeShell
|
|
|
|
}:
|
2017-11-01 15:38:45 +01:00
|
|
|
|
|
|
|
assert withWayland -> wayland != null && libxkbcommon != null;
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2014-01-25 17:05:33 +01:00
|
|
|
|
2017-05-23 04:09:48 +02:00
|
|
|
let
|
2017-11-01 15:38:45 +01:00
|
|
|
emojiSrcs = {
|
|
|
|
data = fetchurl {
|
|
|
|
url = "http://unicode.org/Public/emoji/5.0/emoji-data.txt";
|
|
|
|
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";
|
2017-05-23 04:09:48 +02:00
|
|
|
};
|
2017-11-01 15:38:45 +01:00
|
|
|
};
|
|
|
|
emojiData = stdenv.mkDerivation {
|
2017-05-23 04:09:48 +02:00
|
|
|
name = "emoji-data-5.0";
|
2019-06-19 17:45:34 +02:00
|
|
|
dontUnpack = true;
|
2017-11-01 15:38:45 +01:00
|
|
|
installPhase = ''
|
2017-05-23 04:09:48 +02:00
|
|
|
mkdir $out
|
2017-11-01 15:38:45 +01:00
|
|
|
${builtins.toString (flip mapAttrsToList emojiSrcs (k: v: "cp ${v} $out/emoji-${k}.txt;"))}
|
2017-05-23 04:09:48 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
cldrEmojiAnnotation = stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "cldr-emoji-annotation";
|
2017-11-01 15:38:45 +01:00
|
|
|
version = "31.90.0_1";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fujiwarat";
|
|
|
|
repo = "cldr-emoji-annotation";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1vsj32bg8ab4d80rz0fxy6sj2lv31inzyjnddjm079bnvlaf2kih";
|
2017-05-23 04:09:48 +02:00
|
|
|
};
|
2017-11-01 15:38:45 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2017-05-23 04:09:48 +02:00
|
|
|
};
|
2019-10-07 17:35:10 +02:00
|
|
|
ucdVersion = "12.0.0";
|
2019-04-03 13:20:00 +02:00
|
|
|
ucdSrcs = {
|
|
|
|
NamesList = fetchurl {
|
2019-10-07 17:35:10 +02:00
|
|
|
url = "https://www.unicode.org/Public/${ucdVersion}/ucd/NamesList.txt";
|
2019-04-03 13:20:00 +02:00
|
|
|
sha256 = "c17c7726f562bd9ef869096807f0297e1edef9a58fdae1fbae487378fa43586f";
|
|
|
|
};
|
|
|
|
Blocks = fetchurl {
|
2019-10-07 17:35:10 +02:00
|
|
|
url = "https://www.unicode.org/Public/${ucdVersion}/ucd/Blocks.txt";
|
2019-04-03 13:20:00 +02:00
|
|
|
sha256 = "a1a3ca4381eb91f7b65afe7cb7df615cdcf67993fef4b486585f66b349993a10";
|
|
|
|
};
|
|
|
|
};
|
2019-08-13 23:52:01 +02:00
|
|
|
ucd = stdenv.mkDerivation {
|
2019-10-07 17:35:10 +02:00
|
|
|
name = "ucd-${ucdVersion}";
|
2019-06-19 17:45:34 +02:00
|
|
|
dontUnpack = true;
|
2019-04-03 13:20:00 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
${builtins.toString (flip mapAttrsToList ucdSrcs (k: v: "cp ${v} $out/${k}.txt;"))}
|
|
|
|
'';
|
|
|
|
};
|
2017-11-01 15:38:45 +01:00
|
|
|
python3Runtime = python3.withPackages (ps: with ps; [ pygobject3 ]);
|
|
|
|
python3BuildEnv = python3.buildEnv.override {
|
2017-10-01 11:56:08 +02:00
|
|
|
# ImportError: No module named site
|
|
|
|
postBuild = ''
|
2017-11-01 15:38:45 +01:00
|
|
|
makeWrapper ${glib.dev}/bin/gdbus-codegen $out/bin/gdbus-codegen --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
|
2017-10-01 11:56:08 +02:00
|
|
|
'';
|
2017-08-28 20:58:49 +02:00
|
|
|
};
|
2017-11-01 15:38:45 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "ibus";
|
2019-04-03 13:20:00 +02:00
|
|
|
version = "1.5.20";
|
2014-01-25 17:05:33 +01:00
|
|
|
|
2017-11-01 15:38:45 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ibus";
|
|
|
|
repo = "ibus";
|
|
|
|
rev = version;
|
2019-04-03 13:20:00 +02:00
|
|
|
sha256 = "1npavb896qrp6qbqayb0va4mpsi68wybcnlbjknzgssqyw2ylh9r";
|
2014-01-25 17:05:33 +01:00
|
|
|
};
|
|
|
|
|
2019-06-01 14:33:32 +02:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
pythonInterpreter = python3Runtime.interpreter;
|
|
|
|
pythonSitePackages = python3.sitePackages;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-09-25 12:44:52 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2016-02-27 00:30:01 +01:00
|
|
|
postPatch = ''
|
2019-02-26 12:45:54 +01:00
|
|
|
echo \#!${runtimeShell} > data/dconf/make-dconf-override-db.sh
|
2018-10-29 16:15:19 +01:00
|
|
|
cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make .
|
2016-02-27 00:30:01 +01:00
|
|
|
'';
|
|
|
|
|
2017-11-01 15:38:45 +01:00
|
|
|
preAutoreconf = "touch ChangeLog";
|
|
|
|
|
2016-02-27 00:30:01 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-memconf"
|
2017-11-01 15:38:45 +01:00
|
|
|
(enableFeature (dconf != null) "dconf")
|
|
|
|
(enableFeature (libnotify != null) "libnotify")
|
|
|
|
(enableFeature withWayland "wayland")
|
2019-06-01 15:03:42 +02:00
|
|
|
(enableFeature enablePython2Library "python-library")
|
|
|
|
(enableFeature enablePython2Library "python2") # XXX: python2 library does not work anyway
|
2017-11-01 15:38:45 +01:00
|
|
|
(enableFeature enableUI "ui")
|
2017-05-23 04:09:48 +02:00
|
|
|
"--with-unicode-emoji-dir=${emojiData}"
|
|
|
|
"--with-emoji-annotation-dir=${cldrEmojiAnnotation}/share/unicode/cldr/common/annotations"
|
2019-04-03 13:20:00 +02:00
|
|
|
"--with-ucd-dir=${ucd}"
|
2016-02-27 00:30:01 +01:00
|
|
|
];
|
2014-01-25 17:05:33 +01:00
|
|
|
|
2017-11-01 15:38:45 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2018-02-25 03:23:58 +01:00
|
|
|
gtk-doc
|
2019-04-03 13:20:00 +02:00
|
|
|
gettext
|
2017-11-01 15:38:45 +01:00
|
|
|
makeWrapper
|
|
|
|
pkgconfig
|
|
|
|
python3BuildEnv
|
|
|
|
vala
|
|
|
|
wrapGAppsHook
|
2014-01-25 17:05:33 +01:00
|
|
|
];
|
|
|
|
|
2019-11-07 19:01:21 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
2016-08-22 05:11:18 +02:00
|
|
|
|
2017-11-01 15:38:45 +01:00
|
|
|
buildInputs = [
|
|
|
|
dbus
|
|
|
|
dconf
|
2019-05-22 13:03:39 +02:00
|
|
|
gdk-pixbuf
|
2018-12-02 12:41:15 +01:00
|
|
|
gobject-introspection
|
2019-06-01 14:59:25 +02:00
|
|
|
python3.pkgs.pygobject3 # for pygobject overrides
|
2017-11-01 15:38:45 +01:00
|
|
|
gtk2
|
|
|
|
gtk3
|
|
|
|
isocodes
|
2018-02-25 03:23:58 +01:00
|
|
|
json-glib
|
2017-11-01 15:38:45 +01:00
|
|
|
libnotify
|
|
|
|
] ++ optionals withWayland [
|
|
|
|
libxkbcommon
|
|
|
|
wayland
|
|
|
|
];
|
2017-03-20 15:18:56 +01:00
|
|
|
|
2017-03-25 21:53:01 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-04-25 05:20:18 +02:00
|
|
|
doCheck = false; # requires X11 daemon
|
2016-09-30 02:57:51 +02:00
|
|
|
doInstallCheck = true;
|
2019-11-07 19:01:21 +01:00
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/ibus version
|
|
|
|
'';
|
2016-09-30 02:57:51 +02:00
|
|
|
|
2017-11-01 15:38:45 +01:00
|
|
|
meta = {
|
2019-11-07 19:01:21 +01:00
|
|
|
homepage = "https://github.com/ibus/ibus";
|
2017-11-01 15:38:45 +01:00
|
|
|
description = "Intelligent Input Bus, input method framework";
|
|
|
|
license = licenses.lgpl21Plus;
|
2016-02-27 00:30:01 +01:00
|
|
|
platforms = platforms.linux;
|
2017-11-01 15:38:45 +01:00
|
|
|
maintainers = with maintainers; [ ttuegel yegortimoshenko ];
|
2014-01-25 17:05:33 +01:00
|
|
|
};
|
|
|
|
}
|