2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, symlinkJoin
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "15.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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-sequences = fetchData {
|
|
|
|
file = "emoji-sequences.txt";
|
2022-09-22 12:36:57 +00:00
|
|
|
sha256 = "sha256-vRpXHAcdY3arTnFwBH3WUW3DOh8B3L9+sRcecLHZ2lg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
emoji-test = fetchData {
|
|
|
|
file = "emoji-test.txt";
|
2022-09-22 12:36:57 +00:00
|
|
|
sha256 = "sha256-3Rega6+ZJ5jXRhLFL/i/12V5IypEo5FaGG6Wf9Bj0UU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
emoji-zwj-sequences = fetchData {
|
|
|
|
file = "emoji-zwj-sequences.txt";
|
2022-09-22 12:36:57 +00:00
|
|
|
sha256 = "sha256-9AqrpyUCiBcR/fafa4VaH0pT5o1YzEZDVySsX4ja1u8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
symlinkJoin rec {
|
|
|
|
name = "unicode-emoji-${version}";
|
|
|
|
|
|
|
|
paths = lib.attrValues srcs;
|
|
|
|
|
|
|
|
passthru = srcs;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Unicode Emoji Data Files";
|
|
|
|
homepage = "https://home.unicode.org/emoji/";
|
|
|
|
license = licenses.unicode-dfs-2016;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|