2016-11-23 15:56:15 +01:00
|
|
|
{ stdenv, fetchFromGitHub, python2Packages, fontforge }:
|
2016-05-11 05:26:05 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "xits-math-${version}";
|
|
|
|
version = "1.108";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "khaledhosny";
|
|
|
|
repo = "xits-math";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "08nn676c41a7gmmhrzi8mm0g74z8aiaafjk48pqcwxvjj9av7xjg";
|
|
|
|
};
|
|
|
|
|
2016-11-23 15:56:15 +01:00
|
|
|
nativeBuildInputs = [ fontforge ] ++ (with python2Packages; [ python fonttools ]);
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm *.otf
|
2017-08-12 16:22:45 +02:00
|
|
|
|
|
|
|
substituteInPlace tools/postprocess.py --replace \
|
|
|
|
'font = ttLib.TTFont(sys.argv[1])' \
|
|
|
|
'font = ttLib.TTFont(sys.argv[1], recalcTimestamp=False)'
|
2016-11-23 15:56:15 +01:00
|
|
|
'';
|
2016-05-11 05:26:05 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/fonts/opentype
|
|
|
|
cp *.otf $out/share/fonts/opentype
|
|
|
|
'';
|
|
|
|
|
2017-08-12 16:22:45 +02:00
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = "00xycmb9ka67j5s66nkng53y8q6362igisxz04zb58r2717jk50m";
|
|
|
|
|
2016-05-11 05:26:05 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://github.com/khaledhosny/xits-math;
|
2016-05-11 05:26:05 +02:00
|
|
|
description = "OpenType implementation of STIX fonts with math support";
|
|
|
|
license = licenses.ofl;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|