1 { lib, fetchurl, runCommand, libarchive }:
5 version-full = "${version}.0";
7 emoji-data = fetchurl {
8 url = "http://www.unicode.org/Public/emoji/${version}/emoji-data.txt";
9 sha256 = "03sf7h1d6kb9m5s02lif88jsi5kjszpkfvcymaqxj8ds70ar9pgv";
11 emoji-sequences = fetchurl {
12 url = "http://www.unicode.org/Public/emoji/${version}/emoji-sequences.txt";
13 sha256 = "1hghki2rn3n7m4lwpwi2a5wrsf2nij4bxga9ldabx4g0g2k23svs";
15 emoji-test = fetchurl {
16 url = "http://www.unicode.org/Public/emoji/${version}/emoji-test.txt";
17 sha256 = "1dqd0fh999mh6naj816ni113m9dimfy3ih9nffjq2lrv9mmlgdck";
19 emoji-variation-sequences = fetchurl {
20 url = "http://www.unicode.org/Public/emoji/${version}/emoji-variation-sequences.txt";
21 sha256 = "1cccwx5bl79w4c19vi5dhjqxrph92s8hihp9y8s2cqvdzmgbln7a";
23 emoji-zwj-sequences = fetchurl {
24 url = "http://www.unicode.org/Public/emoji/${version}/emoji-zwj-sequences.txt";
25 sha256 = "1l791nbijmmhwa7kmvfn8gp26ban512l6mgqpz1mnbq3xm19181n";
30 url = "http://www.unicode.org/Public/zipped/${version-full}/UCD.zip";
31 sha256 = "1ighy39cjkmqnv1797wrxjz76mv1fdw7zp5j04q55bkwxsdkvrmh";
34 url = "http://www.unicode.org/Public/zipped/${version-full}/Unihan.zip";
35 sha256 = "1kfdhgg2gm52x3s07bijb5cxjy0jxwhd097k5lqhvzpznprm6ibf";
39 runCommand "unicode" {
40 buildInputs = [ libarchive ];
42 mkdir -p $out/share/unicode
43 ${builtins.concatStringsSep "\n" (mapAttrsToList (n: u: "install -Dm644 ${u} $out/share/unicode/emoji/${n}.txt") files)}
44 ${builtins.concatStringsSep "\n" (mapAttrsToList (n: u: ''
45 install -Dm644 ${u} $out/share/unicode/${n}.zip
46 bsdtar -C "$out/share/unicode" -x -f "$out/share/unicode/${n}.zip"