···1+{ stdenv, fetchFromGitHub, inkscape, imagemagick, potrace, svgo, scfbuild }:
2+3+stdenv.mkDerivation rec {
4+ name = "twemoji-color-font-${meta.version}";
5+ src = fetchFromGitHub {
6+ owner = "eosrei";
7+ repo = "twemoji-color-font";
8+ rev = "v${meta.version}";
9+ sha256 = "0i7krmg99nrrj7mbjjd2cw6dx24aja63571mcyp6d7q1z09asz9k";
10+ };
11+12+ nativeBuildInputs = [ inkscape imagemagick potrace svgo scfbuild ];
13+ # silence inkscape errors about non-writable home
14+ preBuild = "export HOME=\"$NIX_BUILD_ROOT\"";
15+ makeFlags = [ "SCFBUILD=${scfbuild}/bin/scfbuild" ];
16+ enableParallelBuilding = true;
17+ installPhase = "install -Dm755 build/TwitterColorEmoji-SVGinOT.ttf $out/share/fonts/truetype/TwitterColorEmoji-SVGinOT.ttf";
18+19+ meta = with stdenv.lib; {
20+ version = "1.3";
21+ description = "Color emoji SVGinOT font using Twitter Unicode 10 emoji with diversity and country flags";
22+ longDescription = ''
23+ A color and B&W emoji SVGinOT font built from the Twitter Emoji for
24+ Everyone artwork with support for ZWJ, skin tone diversity and country
25+ flags.
26+27+ The font works in all operating systems, but will currently only show
28+ color emoji in Firefox, Thunderbird, Photoshop CC 2017, and Windows Edge
29+ V38.14393+. This is not a limitation of the font, but of the operating
30+ systems and applications. Regular B&W outline emoji are included for
31+ backwards/fallback compatibility.
32+ '';
33+ homepage = "https://github.com/eosrei/twemoji-color-font";
34+ downloadPage = "https://github.com/eosrei/twemoji-color-font/releases";
35+ license = with licenses; [ cc-by-40 mit ];
36+ maintainers = [ maintainers.fgaz ];
37+ platforms = platforms.all;
38+ };
39+}