1{
2 fetchFromGitHub,
3 lib,
4 buildPythonPackage,
5 pythonOlder,
6 afdko,
7 appdirs,
8 attrs,
9 booleanoperations,
10 brotlipy,
11 click,
12 defcon,
13 fontmath,
14 fontparts,
15 fontpens,
16 fonttools,
17 lxml,
18 mutatormath,
19 pathspec,
20 psautohint,
21 pyclipper,
22 pytz,
23 regex,
24 scour,
25 toml,
26 typed-ast,
27 ufonormalizer,
28 ufoprocessor,
29 unicodedata2,
30 zopfli,
31 pillow,
32 six,
33 bash,
34 setuptools-scm,
35}:
36
37buildPythonPackage rec {
38 pname = "nototools";
39 version = "0.2.20";
40
41 disabled = pythonOlder "3.6";
42
43 src = fetchFromGitHub {
44 owner = "googlefonts";
45 repo = "nototools";
46 rev = "refs/tags/v${version}";
47 sha256 = "sha256-id4UhyWOFHrtmBZHhnaY2jHDIK0s7rcGBpg4QsBTLKs=";
48 };
49
50 postPatch = ''
51 sed -i 's/use_scm_version=.*,/version="${version}",/' setup.py
52 '';
53
54 nativeBuildInputs = [ setuptools-scm ];
55
56 propagatedBuildInputs = [
57 afdko
58 appdirs
59 attrs
60 booleanoperations
61 brotlipy
62 click
63 defcon
64 fontmath
65 fontparts
66 fontpens
67 fonttools
68 lxml
69 mutatormath
70 pathspec
71 psautohint
72 pyclipper
73 pytz
74 regex
75 scour
76 toml
77 typed-ast
78 ufonormalizer
79 ufoprocessor
80 unicodedata2
81 zopfli
82 ];
83
84 nativeCheckInputs = [
85 pillow
86 six
87 bash
88 ];
89
90 checkPhase = ''
91 patchShebangs tests/
92 cd tests
93 rm gpos_diff_test.py # needs ttxn?
94 ./run_tests
95 '';
96
97 postInstall = ''
98 cp -r third_party $out
99 '';
100
101 meta = with lib; {
102 description = "Noto fonts support tools and scripts plus web site generation";
103 homepage = "https://github.com/googlefonts/nototools";
104 license = licenses.asl20;
105 maintainers = [ ];
106 };
107}