noto-fonts-emoji: 2015-08-17 -> 2016-03-17

This commit is contained in:
Nikolay Amiantov 2016-03-29 21:00:18 +03:00
parent 08db1b19a2
commit f4fa3565b8

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, fetchFromGitHub, optipng, cairo, unzip, fontforge, pythonPackages, pkgconfig }:
{ stdenv, fetchurl, fetchFromGitHub, optipng, cairo, unzip, pythonPackages, pkgconfig, pngquant, which, imagemagick }:
rec {
# 18MB
noto-fonts = let version = "git-2016-03-29"; in stdenv.mkDerivation {
@ -92,34 +93,30 @@ rec {
};
};
# 12MB
noto-fonts-emoji = let version = "git-2015-08-17"; in stdenv.mkDerivation {
noto-fonts-emoji = let version = "git-2016-03-17"; in stdenv.mkDerivation {
name = "noto-fonts-emoji-${version}";
src = fetchFromGitHub {
owner = "googlei18n";
repo = "noto-emoji";
rev = "ffd7cfd0c84b7bf37210d0908ac94adfe3259ff2";
sha256 = "1pa94gw2y0b6p8r81zbjzcjgi5nrx4dqrqr6mk98wj6jbi465sh2";
rev = "c6379827aaa9cb0baca1a08a9d44ae74ca505236";
sha256 = "1zh1b617cjr5laha6lx0ys4k1c3az2zkgzjwc2nlb7dsdmfw1n0q";
};
buildInputs = with pythonPackages; [
optipng cairo fontforge python nototools fonttools pkgconfig
];
buildInputs = [ cairo ]
nativeBuildInputs = [ pngquant optipng which cairo pkgconfig imagemagick ]
++ (with pythonPackages; [ python fonttools nototools ]);
#FIXME: perhaps use our pngquant instead
preConfigure = ''
for f in ./*.py ./third_party/pngquant/configure; do
patchShebangs "$f"
done
postPatch = ''
sed -i 's,^PNGQUANT :=.*,PNGQUANT := ${pngquant}/bin/pngquant,' Makefile
patchShebangs flag_glyph_name.py
'';
preBuild = ''
export PYTHONPATH=$PYTHONPATH:$PWD
'';
enableParallelBuilding = true;
installPhase = ''
mkdir -p $out/share/fonts/noto
cp NotoColorEmoji.ttf NotoEmoji-Regular.ttf $out/share/fonts/noto
cp NotoColorEmoji.ttf fonts/NotoEmoji-Regular.ttf $out/share/fonts/noto
'';
meta = with stdenv.lib; {