summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/ibus
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2017-05-23 04:09:48 +0200
committerRobin Gloster <mail@glob.in>2017-05-23 04:09:48 +0200
commit38625a8b1e67c2b4dc10b1c3f2ac5be5732e3c51 (patch)
tree4b681851abeda1f280cb86da2ffcb9889211f4f5 /pkgs/tools/inputmethods/ibus
parentdff06b9ddc85fb7cfaccb08d289994dc554f373e (diff)
downloadnixpkgs-38625a8b1e67c2b4dc10b1c3f2ac5be5732e3c51.tar
nixpkgs-38625a8b1e67c2b4dc10b1c3f2ac5be5732e3c51.tar.gz
nixpkgs-38625a8b1e67c2b4dc10b1c3f2ac5be5732e3c51.tar.bz2
nixpkgs-38625a8b1e67c2b4dc10b1c3f2ac5be5732e3c51.tar.lz
nixpkgs-38625a8b1e67c2b4dc10b1c3f2ac5be5732e3c51.tar.xz
nixpkgs-38625a8b1e67c2b4dc10b1c3f2ac5be5732e3c51.tar.zst
nixpkgs-38625a8b1e67c2b4dc10b1c3f2ac5be5732e3c51.zip
ibus: 1.5.14 -> 1.5.16
Changed emoji handling in ibus requires some new static files
Diffstat (limited to 'pkgs/tools/inputmethods/ibus')
-rw-r--r--pkgs/tools/inputmethods/ibus/default.nix53
1 files changed, 48 insertions, 5 deletions
diff --git a/pkgs/tools/inputmethods/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix
index 1654f57c8ed..d392777dfd4 100644
--- a/pkgs/tools/inputmethods/ibus/default.nix
+++ b/pkgs/tools/inputmethods/ibus/default.nix
@@ -3,16 +3,58 @@
 , python3
 , gtk2, gtk3, atk, dconf, glib, json_glib
 , dbus, libnotify, gobjectIntrospection, wayland
-, nodePackages
 }:
 
-stdenv.mkDerivation rec {
+let
+  emojiData = let
+    srcs = {
+      data = fetchurl {
+        url = "http://unicode.org/Public/emoji/5.0/emoji-data.txt";
+        sha256 = "0zfn3z61xy76yah3d24dd745qjssrib009m4nvqpnx4sf1r13i2x";
+      };
+      sequences = fetchurl {
+        url = "http://unicode.org/Public/emoji/5.0/emoji-sequences.txt";
+        sha256 = "0xzk7hi2a8macx9s5gj2pb36d38y8fa9001sj71g6kw25c2h94cn";
+      };
+      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 = "0rrnk94mhm3k9vs74pvyvs4ir7f31f1libx7c196fmdqvp1qfafw";
+      };
+      test = fetchurl {
+        url = "http://unicode.org/Public/emoji/5.0/emoji-test.txt";
+        sha256 = "1dvxw5xp1xiy13c1p1c7l2xc9q8f8znk47kb7q8g7bbgbi21cq5m";
+      };
+    };
+  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";
+    };
+  };
+in stdenv.mkDerivation rec {
   name = "ibus-${version}";
-  version = "1.5.14";
+  version = "1.5.16";
 
   src = fetchurl {
     url = "https://github.com/ibus/ibus/releases/download/${version}/${name}.tar.gz";
-    sha256 = "0g4x02d7j5w1lfn4zvmzsq93h17lajgn9d7hlvr6pws28vz40ax4";
+    sha256 = "07py16jb81kd7vkqhcia9cb2avsbg5jswp2kzf0k4bprwkxppd9n";
   };
 
   postPatch = ''
@@ -30,7 +72,8 @@ stdenv.mkDerivation rec {
     "--disable-memconf"
     "--enable-ui"
     "--enable-python-library"
-    "--with-emoji-json-file=${nodePackages.emojione}/lib/node_modules/emojione/emoji.json"
+    "--with-unicode-emoji-dir=${emojiData}"
+    "--with-emoji-annotation-dir=${cldrEmojiAnnotation}/share/unicode/cldr/common/annotations"
   ];
 
   buildInputs = [