nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder, python
2, fonttools, defcon, lxml, fs, unicodedata2, zopfli, brotlipy, fontpens
3, brotli, fontmath, mutatormath, booleanoperations
4, ufoprocessor, ufonormalizer, psautohint, tqdm
5, setuptools_scm
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "afdko";
11 version = "3.5.1";
12
13 disabled = pythonOlder "3.6";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "1qg7dgl81yq0sp50pkhgvmf8az1svx20zmpkfa68ka9d0ssh1wjw";
18 };
19
20 patches = [
21 # Skip date-dependent test. See
22 # https://github.com/adobe-type-tools/afdko/pull/1232
23 # https://github.com/NixOS/nixpkgs/pull/98158#issuecomment-704321117
24 (fetchpatch {
25 url = "https://github.com/adobe-type-tools/afdko/commit/2c36ad10f9d964759f643e8ed7b0972a27aa26bd.patch";
26 sha256 = "0p6a485mmzrbfldfbhgfghsypfiad3cabcw7qlw2rh993ivpnibf";
27 })
28 # fix tests for fonttools 4.21.1
29 (fetchpatch {
30 url = "https://github.com/adobe-type-tools/afdko/commit/0919e7454a0a05a1b141c23bf8134c67e6b688fc.patch";
31 sha256 = "0glly85swyl1kcc0mi8i0w4bm148bb001jz1winz5drfrw3a63jp";
32 })
33 ];
34
35 nativeBuildInputs = [ setuptools_scm ];
36
37 propagatedBuildInputs = [
38 booleanoperations
39 fonttools
40 lxml # fonttools[lxml], defcon[lxml] extra
41 fs # fonttools[ufo] extra
42 unicodedata2 # fonttools[unicode] extra
43 brotlipy # fonttools[woff] extra
44 zopfli # fonttools[woff] extra
45 fontpens
46 brotli
47 defcon
48 fontmath
49 mutatormath
50 ufoprocessor
51 ufonormalizer
52 psautohint
53 tqdm
54 ];
55
56 # tests are broken on non x86_64
57 # https://github.com/adobe-type-tools/afdko/issues/1163
58 # https://github.com/adobe-type-tools/afdko/issues/1216
59 doCheck = stdenv.isx86_64;
60 checkInputs = [ pytestCheckHook ];
61 preCheck = "export PATH=$PATH:$out/bin";
62 disabledTests = [
63 # Disable slow tests, reduces test time ~25 %
64 "test_report"
65 "test_post_overflow"
66 "test_cjk"
67 "test_extrapolate"
68 "test_filename_without_dir"
69 "test_overwrite"
70 "test_options"
71 ];
72
73 meta = with lib; {
74 description = "Adobe Font Development Kit for OpenType";
75 homepage = "https://adobe-type-tools.github.io/afdko/";
76 license = licenses.asl20;
77 maintainers = [ maintainers.sternenseemann ];
78 };
79}