1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonRelaxDepsHook,
6 pytestCheckHook,
7 poetry-core,
8 poetry-dynamic-versioning,
9 blackrenderer,
10 fonttools,
11 freetype-py,
12 gflanguages,
13 glyphsets,
14 jinja2,
15 ninja,
16 pillow,
17 protobuf,
18 pyahocorasick,
19 python-bidi,
20 selenium,
21 tqdm,
22 uharfbuzz,
23 unicodedata2,
24 youseedee,
25 numpy,
26}:
27
28buildPythonPackage rec {
29 pname = "diffenator2";
30 version = "0.4.5";
31 pyproject = true;
32
33 src = fetchFromGitHub {
34 owner = "googlefonts";
35 repo = "diffenator2";
36 rev = "refs/tags/v${version}";
37 hash = "sha256-Iu6ZA8s6XnOYSOwlt8WTmYW6oUTvcm4vLhYvVATOlBA=";
38 };
39
40 env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
41
42 pythonRelaxDeps = [
43 "protobuf"
44 "python-bidi"
45 "youseedee"
46 ];
47
48 build-system = [
49 poetry-core
50 poetry-dynamic-versioning
51 ];
52
53 dependencies = [
54 blackrenderer
55 fonttools
56 freetype-py
57 gflanguages
58 glyphsets
59 jinja2
60 ninja
61 pillow
62 protobuf
63 pyahocorasick
64 python-bidi
65 selenium
66 tqdm
67 uharfbuzz
68 unicodedata2
69 youseedee
70 numpy
71 ];
72
73 nativeCheckInputs = [ pytestCheckHook ];
74
75 disabledTests = [
76 # requires internet
77 "test_download_google_fonts_family_to_file"
78 "test_download_google_fonts_family_to_bytes"
79 "test_download_google_fonts_family_not_existing"
80 "test_download_latest_github_release"
81 ];
82
83 disabledTestPaths = [
84 # Want the files downloaded by the tests above
85 "tests/test_functional.py"
86 "tests/test_html.py"
87 "tests/test_matcher.py"
88 "tests/test_font.py"
89 ];
90
91 meta = {
92 description = "Font comparison tool that will not stop until your fonts are exhaustively compared";
93 homepage = "https://github.com/googlefonts/diffenator2";
94 changelog = "https://github.com/googlefonts/diffenator2/releases/tag/v${version}";
95 license = lib.licenses.asl20;
96 mainProgram = "diffenator2";
97 maintainers = with lib.maintainers; [ jopejoe1 ];
98 };
99}