25 buildPythonPackage rec {
29 disabled = pythonOlder "3.7";
31 src = fetchFromGitHub {
34 rev = "refs/tags/${version}";
35 sha256 = "sha256-GwbcrDsfxs5qRQJozhK/+n3W3NlO39g7pzxL9iIiDfU=";
38 nativeBuildInputs = [ setuptools-scm ];
40 passthru.optional-dependencies = let
44 woff = [ (if isPyPy then brotlicffi else brotli) zopfli ];
45 unicode = lib.optional (pythonOlder "3.11") unicodedata2;
47 interpolatable = [ (if isPyPy then munkres else scipy) ];
48 plot = [ matplotlib ];
50 type1 = lib.optional stdenv.isDarwin xattr;
51 pathops = [ skia-pathops ];
52 repacker = [ uharfbuzz ];
55 all = lib.concatLists (lib.attrValues extras);
60 ] ++ lib.concatLists (lib.attrVals ([
63 ] ++ lib.optionals (!skia-pathops.meta.broken) [
67 ]) passthru.optional-dependencies);
69 pythonImportsCheck = [ "fontTools" ];
72 # tests want to execute the "fonttools" executable from $PATH
73 export PATH="$out/bin:$PATH"
76 # Timestamp tests have timing issues probably related
77 # to our file timestamp normalization
79 "test_recalc_timestamp_ttf"
80 "test_recalc_timestamp_otf"
81 "test_ttcompile_timestamp_calcs"
85 # avoid test which depend on fs and matplotlib
86 # fs and matplotlib were removed to prevent strong cyclic dependencies
87 "Tests/misc/plistlib_test.py"
93 homepage = "https://github.com/fonttools/fonttools";
94 description = "A library to manipulate font files from Python";
95 license = licenses.mit;
96 maintainers = [ maintainers.sternenseemann ];