2019-10-29 09:38:59 +00:00
|
|
|
{ fetchFromGitHub, lib, fetchpatch, buildPythonPackage, isPy3k, fonttools, numpy, pillow, six, bash }:
|
2017-11-22 05:19:48 +00:00
|
|
|
|
2019-10-29 09:38:59 +00:00
|
|
|
buildPythonPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "nototools";
|
2019-10-29 09:38:59 +00:00
|
|
|
version = "unstable-2019-10-21";
|
2017-11-22 05:19:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-08-29 16:23:10 +01:00
|
|
|
owner = "googlefonts";
|
2017-11-22 05:19:48 +00:00
|
|
|
repo = "nototools";
|
2019-10-29 09:38:59 +00:00
|
|
|
rev = "cae92ce958bee37748bf0602f5d7d97bb6db98ca";
|
|
|
|
sha256 = "1jqr0dz23rjqiyxw1w69l6ry16dwdcf3c6cysiy793g2v7pir2yi";
|
2017-11-22 05:19:48 +00:00
|
|
|
};
|
|
|
|
|
2019-10-29 09:38:59 +00:00
|
|
|
propagatedBuildInputs = [ fonttools numpy ];
|
|
|
|
|
|
|
|
patches = lib.optionals isPy3k [
|
|
|
|
# Additional Python 3 compat https://github.com/googlefonts/nototools/pull/497
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/googlefonts/nototools/commit/ded1f311b3260f015b5c5b80f05f7185392c4eff.patch;
|
|
|
|
sha256 = "0bn0rlbddxicw0h1dnl0cibgj6xjalja2qcm563y7kk3z5cdwhgq";
|
|
|
|
})
|
|
|
|
];
|
2017-11-22 05:19:48 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -ie "s^join(_DATA_DIR_PATH,^join(\"$out/third_party/ucd\",^" nototools/unicode_data.py
|
|
|
|
'';
|
|
|
|
|
2019-10-29 09:38:59 +00:00
|
|
|
checkInputs = [
|
|
|
|
pillow six bash
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
patchShebangs tests/
|
|
|
|
cd tests
|
|
|
|
rm gpos_diff_test.py # needs ttxn?
|
|
|
|
./run_tests
|
|
|
|
'';
|
|
|
|
|
2017-11-22 05:19:48 +00:00
|
|
|
postInstall = ''
|
|
|
|
cp -r third_party $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Noto fonts support tools and scripts plus web site generation";
|
|
|
|
license = lib.licenses.asl20;
|
2019-08-29 16:23:10 +01:00
|
|
|
homepage = https://github.com/googlefonts/nototools;
|
2017-11-22 05:19:48 +00:00
|
|
|
};
|
|
|
|
}
|