2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2023-02-16 17:41:37 +00:00
|
|
|
, stdenvNoCC
|
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
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
fetchData = { suffix, hash }: stdenvNoCC.mkDerivation {
|
|
|
|
pname = "unicode-emoji-${suffix}";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.unicode.org/Public/emoji/${version}/emoji-${suffix}.txt";
|
|
|
|
inherit hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installDir="$out/share/unicode/emoji"
|
|
|
|
mkdir -p "$installDir"
|
2023-02-16 17:41:37 +00:00
|
|
|
cp "$src" "$installDir/emoji-${suffix}.txt"
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
srcs = {
|
|
|
|
emoji-sequences = fetchData {
|
2023-02-16 17:41:37 +00:00
|
|
|
suffix = "sequences";
|
|
|
|
hash = "sha256-XCIi2KQy2JagMaaML1SwT79HsPzi5phT8euKPpRetW0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
emoji-test = fetchData {
|
2023-02-16 17:41:37 +00:00
|
|
|
suffix = "test";
|
|
|
|
hash = "sha256-hEXyOsg4jglr4Z0CYuFPzv+Fb/Ugk/I1bciUhfGoU9s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
emoji-zwj-sequences = fetchData {
|
2023-02-16 17:41:37 +00:00
|
|
|
suffix = "zwj-sequences";
|
|
|
|
hash = "sha256-/jV/kRe3dGZ2Bjdl1YcTft+bJZA6eSvVSTW/CFZ5EYI=";
|
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;
|
|
|
|
};
|
|
|
|
}
|