1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 poetry-core,
7 poetry-dynamic-versioning,
8 blackrenderer,
9 fonttools,
10 freetype-py,
11 gflanguages,
12 glyphsets,
13 jinja2,
14 ninja,
15 pillow,
16 protobuf,
17 pyahocorasick,
18 python-bidi,
19 selenium,
20 tqdm,
21 uharfbuzz,
22 unicodedata2,
23 youseedee,
24 numpy,
25}:
26
27buildPythonPackage rec {
28 pname = "diffenator2";
29 version = "0.4.9";
30 pyproject = true;
31
32 src = fetchFromGitHub {
33 owner = "googlefonts";
34 repo = "diffenator2";
35 tag = "v${version}";
36 hash = "sha256-EV+ju2PnjqRsjQvh/bQJYtDOO4vvisoU0aqlV9vMQp8=";
37 };
38
39 env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
40
41 pythonRelaxDeps = [
42 "protobuf"
43 "python-bidi"
44 "youseedee"
45 "unicodedata2"
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/${src.tag}";
95 license = lib.licenses.asl20;
96 mainProgram = "diffenator2";
97 maintainers = with lib.maintainers; [ jopejoe1 ];
98 };
99}