summary refs log tree commit diff
path: root/pkgs/data
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-11-07 18:53:54 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-12-07 00:58:29 +0100
commit808082f6b6a91c028c5521119ac9b0e1429c28b2 (patch)
treeb1b8c1a24543ee7300b5251464bf19d238d3c6cb /pkgs/data
parent523f0dd754857a8cae32deeedade5b12372a9344 (diff)
downloadnixpkgs-808082f6b6a91c028c5521119ac9b0e1429c28b2.tar
nixpkgs-808082f6b6a91c028c5521119ac9b0e1429c28b2.tar.gz
nixpkgs-808082f6b6a91c028c5521119ac9b0e1429c28b2.tar.bz2
nixpkgs-808082f6b6a91c028c5521119ac9b0e1429c28b2.tar.lz
nixpkgs-808082f6b6a91c028c5521119ac9b0e1429c28b2.tar.xz
nixpkgs-808082f6b6a91c028c5521119ac9b0e1429c28b2.tar.zst
nixpkgs-808082f6b6a91c028c5521119ac9b0e1429c28b2.zip
unicode-emoji: init at 12.1
Diffstat (limited to 'pkgs/data')
-rw-r--r--pkgs/data/misc/unicode-emoji/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/data/misc/unicode-emoji/default.nix b/pkgs/data/misc/unicode-emoji/default.nix
new file mode 100644
index 00000000000..05472b26d88
--- /dev/null
+++ b/pkgs/data/misc/unicode-emoji/default.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, fetchurl
+, symlinkJoin
+, lib
+}:
+
+let
+  version = "12.1";
+
+  fetchData = { file, sha256 }: fetchurl {
+    url = "https://www.unicode.org/Public/emoji/${version}/${file}";
+    inherit sha256;
+    downloadToTemp = true;
+    recursiveHash = true;
+    postFetch = ''
+      installDir="$out/share/unicode/emoji"
+      mkdir -p "$installDir"
+      mv "$downloadedFile" "$installDir/${file}"
+    '';
+  };
+
+  srcs = {
+    emoji-data = fetchData {
+      file = "emoji-data.txt";
+      sha256 = "17gfm5a28lsymx36prbjy2g0b27gf3rcgggy0yxdshbxwf6zpf9k";
+    };
+    emoji-sequences = fetchData {
+      file = "emoji-sequences.txt";
+      sha256 = "1fckw5hfyvz5jfp2jczzx8qcs79vf0zyq0z2942230j99arq70vc";
+    };
+    emoji-test = fetchData {
+      file = "emoji-test.txt";
+      sha256 = "0w29lva7gp9g9lf7bz1i24qdalvf440bcq8npsbwr3cpp7na95kh";
+    };
+    emoji-variation-sequences = fetchData {
+      file = "emoji-variation-sequences.txt";
+      sha256 = "0akpib3cinr8xcs045hda5wnpfj6qfdjlkzmq5vgdc50gyhrd2z3";
+    };
+    emoji-zwj-sequences = fetchData {
+      file = "emoji-zwj-sequences.txt";
+      sha256 = "0s2mvy1nr2v1x0rr1fxlsv8ly1vyf9978rb4hwry5vnr678ls522";
+    };
+  };
+in
+
+symlinkJoin rec {
+  name = "unicode-emoji-${version}";
+
+  paths = lib.attrValues srcs;
+
+  passthru = srcs;
+
+  meta = with stdenv.lib; {
+    description = "Unicode Emoji Data Files";
+    homepage = "https://home.unicode.org/emoji/";
+    license = licenses.free; # https://www.unicode.org/license.html
+    platforms = platforms.all;
+  };
+}