summary refs log tree commit diff
path: root/pkgs/tools/inputmethods
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-11-07 19:06:23 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-12-07 00:58:29 +0100
commit8ed93984edbc50ff4d9bf603b043325735b24d75 (patch)
tree8541530881550c668cb3c1e81e3667dcd7a794e6 /pkgs/tools/inputmethods
parentf6836269fa919ac68fb4e8e5a2644407650188a6 (diff)
downloadnixpkgs-8ed93984edbc50ff4d9bf603b043325735b24d75.tar
nixpkgs-8ed93984edbc50ff4d9bf603b043325735b24d75.tar.gz
nixpkgs-8ed93984edbc50ff4d9bf603b043325735b24d75.tar.bz2
nixpkgs-8ed93984edbc50ff4d9bf603b043325735b24d75.tar.lz
nixpkgs-8ed93984edbc50ff4d9bf603b043325735b24d75.tar.xz
nixpkgs-8ed93984edbc50ff4d9bf603b043325735b24d75.tar.zst
nixpkgs-8ed93984edbc50ff4d9bf603b043325735b24d75.zip
ibus: use external unicode data
Diffstat (limited to 'pkgs/tools/inputmethods')
-rw-r--r--pkgs/tools/inputmethods/ibus/default.nix69
1 files changed, 6 insertions, 63 deletions
diff --git a/pkgs/tools/inputmethods/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix
index 7bf8f3c45a2..cff24a631bb 100644
--- a/pkgs/tools/inputmethods/ibus/default.nix
+++ b/pkgs/tools/inputmethods/ibus/default.nix
@@ -17,6 +17,9 @@
 , gtk3
 , gtk-doc
 , isocodes
+, cldr-emoji-annotation
+, unicode-character-database
+, unicode-emoji
 , python3
 , json-glib
 , libnotify ? null
@@ -34,66 +37,6 @@ assert withWayland -> wayland != null && libxkbcommon != null;
 with stdenv.lib;
 
 let
-  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";
-    };
-  };
-  emojiData = stdenv.mkDerivation {
-    name = "emoji-data-5.0";
-    dontUnpack = true;
-    installPhase = ''
-      mkdir $out
-      ${builtins.toString (flip mapAttrsToList emojiSrcs (k: v: "cp ${v} $out/emoji-${k}.txt;"))}
-    '';
-  };
-  cldrEmojiAnnotation = stdenv.mkDerivation rec {
-    pname = "cldr-emoji-annotation";
-    version = "31.90.0_1";
-    src = fetchFromGitHub {
-      owner = "fujiwarat";
-      repo = "cldr-emoji-annotation";
-      rev = version;
-      sha256 = "1vsj32bg8ab4d80rz0fxy6sj2lv31inzyjnddjm079bnvlaf2kih";
-    };
-    nativeBuildInputs = [ autoreconfHook ];
-  };
-  ucdVersion = "12.0.0";
-  ucdSrcs = {
-    NamesList = fetchurl {
-      url = "https://www.unicode.org/Public/${ucdVersion}/ucd/NamesList.txt";
-      sha256 = "c17c7726f562bd9ef869096807f0297e1edef9a58fdae1fbae487378fa43586f";
-    };
-    Blocks = fetchurl {
-      url = "https://www.unicode.org/Public/${ucdVersion}/ucd/Blocks.txt";
-      sha256 = "a1a3ca4381eb91f7b65afe7cb7df615cdcf67993fef4b486585f66b349993a10";
-    };
-  };
-  ucd = stdenv.mkDerivation {
-    name = "ucd-${ucdVersion}";
-    dontUnpack = true;
-    installPhase = ''
-      mkdir $out
-      ${builtins.toString (flip mapAttrsToList ucdSrcs (k: v: "cp ${v} $out/${k}.txt;"))}
-    '';
-  };
   python3Runtime = python3.withPackages (ps: with ps; [ pygobject3 ]);
   python3BuildEnv = python3.buildEnv.override {
     # ImportError: No module named site
@@ -141,9 +84,9 @@ stdenv.mkDerivation rec {
     (enableFeature enablePython2Library "python-library")
     (enableFeature enablePython2Library "python2") # XXX: python2 library does not work anyway
     (enableFeature enableUI "ui")
-    "--with-unicode-emoji-dir=${emojiData}"
-    "--with-emoji-annotation-dir=${cldrEmojiAnnotation}/share/unicode/cldr/common/annotations"
-    "--with-ucd-dir=${ucd}"
+    "--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
+    "--with-emoji-annotation-dir=${cldr-emoji-annotation}/share/unicode/cldr/common/annotations"
+    "--with-ucd-dir=${unicode-character-database}/share/unicode"
   ];
 
   nativeBuildInputs = [