1{
2 lib,
3 booleanoperations,
4 buildPythonPackage,
5 cffsubr,
6 compreffor,
7 cu2qu,
8 defcon,
9 fetchPypi,
10 fetchpatch2,
11 fontmath,
12 fonttools,
13 pytestCheckHook,
14 pythonOlder,
15 setuptools-scm,
16 skia-pathops,
17 syrupy,
18 ufolib2,
19}:
20
21buildPythonPackage rec {
22 pname = "ufo2ft";
23 version = "3.3.0";
24 pyproject = true;
25
26 disabled = pythonOlder "3.8";
27
28 src = fetchPypi {
29 inherit pname version;
30 hash = "sha256-lw5mLcVw1NFT1c/AOcMyo2a8aGOyxFG+ZAU6Ggnssko=";
31 };
32
33 patches = [
34 (fetchpatch2 {
35 # update syrupy snapshots
36 url = "https://github.com/googlefonts/ufo2ft/commit/7a3edb2e4202cf388e3ffe31b5b3783dbb392db2.patch";
37 hash = "sha256-YEgUgrtgH3PBZlt+xoJme+oPRuDMwq7M/4cJ3JbeuyU=";
38 })
39 ];
40
41 build-system = [
42 setuptools-scm
43 ];
44
45 pythonRelaxDeps = [ "cffsubr" ];
46
47 dependencies =
48 [
49 cu2qu
50 fontmath
51 fonttools
52 defcon
53 compreffor
54 booleanoperations
55 cffsubr
56 ufolib2
57 skia-pathops
58 ]
59 ++ fonttools.optional-dependencies.lxml
60 ++ fonttools.optional-dependencies.ufo;
61
62 nativeCheckInputs = [
63 pytestCheckHook
64 syrupy
65 ];
66
67 disabledTests = [
68 # Do not depend on skia.
69 "test_removeOverlaps_CFF_pathops"
70 "test_removeOverlaps_pathops"
71 "test_custom_filters_as_argument"
72 "test_custom_filters_as_argument"
73 # Some integration tests fail
74 "test_compileVariableCFF2"
75 "test_compileVariableTTF"
76 "test_drop_glyph_names_variable"
77 "test_drop_glyph_names_variable"
78 ];
79
80 pythonImportsCheck = [ "ufo2ft" ];
81
82 meta = with lib; {
83 description = "Bridge from UFOs to FontTools objects";
84 homepage = "https://github.com/googlefonts/ufo2ft";
85 changelog = "https://github.com/googlefonts/ufo2ft/releases/tag/v${version}";
86 license = licenses.mit;
87 maintainers = [ ];
88 };
89}