···11+{ stdenv, fetchFromGitHub, inkscape, imagemagick, potrace, svgo, scfbuild }:
22+33+stdenv.mkDerivation rec {
44+ name = "twemoji-color-font-${meta.version}";
55+ src = fetchFromGitHub {
66+ owner = "eosrei";
77+ repo = "twemoji-color-font";
88+ rev = "v${meta.version}";
99+ sha256 = "0i7krmg99nrrj7mbjjd2cw6dx24aja63571mcyp6d7q1z09asz9k";
1010+ };
1111+1212+ nativeBuildInputs = [ inkscape imagemagick potrace svgo scfbuild ];
1313+ # silence inkscape errors about non-writable home
1414+ preBuild = "export HOME=\"$NIX_BUILD_ROOT\"";
1515+ makeFlags = [ "SCFBUILD=${scfbuild}/bin/scfbuild" ];
1616+ enableParallelBuilding = true;
1717+ installPhase = "install -Dm755 build/TwitterColorEmoji-SVGinOT.ttf $out/share/fonts/truetype/TwitterColorEmoji-SVGinOT.ttf";
1818+1919+ meta = with stdenv.lib; {
2020+ version = "1.3";
2121+ description = "Color emoji SVGinOT font using Twitter Unicode 10 emoji with diversity and country flags";
2222+ longDescription = ''
2323+ A color and B&W emoji SVGinOT font built from the Twitter Emoji for
2424+ Everyone artwork with support for ZWJ, skin tone diversity and country
2525+ flags.
2626+2727+ The font works in all operating systems, but will currently only show
2828+ color emoji in Firefox, Thunderbird, Photoshop CC 2017, and Windows Edge
2929+ V38.14393+. This is not a limitation of the font, but of the operating
3030+ systems and applications. Regular B&W outline emoji are included for
3131+ backwards/fallback compatibility.
3232+ '';
3333+ homepage = "https://github.com/eosrei/twemoji-color-font";
3434+ downloadPage = "https://github.com/eosrei/twemoji-color-font/releases";
3535+ license = with licenses; [ cc-by-40 mit ];
3636+ maintainers = [ maintainers.fgaz ];
3737+ platforms = platforms.all;
3838+ };
3939+}