summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/diffenator2/default.nix
blob: 80f6181eec791b8f0fb63ee102c402c20003bb67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  poetry-core,
  poetry-dynamic-versioning,
  blackrenderer,
  fonttools,
  freetype-py,
  gflanguages,
  glyphsets,
  jinja2,
  ninja,
  pillow,
  protobuf,
  pyahocorasick,
  python-bidi,
  selenium,
  tqdm,
  uharfbuzz,
  unicodedata2,
  youseedee,
  numpy,
}:

buildPythonPackage rec {
  pname = "diffenator2";
  version = "0.4.9";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "googlefonts";
    repo = "diffenator2";
    tag = "v${version}";
    hash = "sha256-EV+ju2PnjqRsjQvh/bQJYtDOO4vvisoU0aqlV9vMQp8=";
  };

  env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";

  pythonRelaxDeps = [
    "protobuf"
    "python-bidi"
    "youseedee"
    "unicodedata2"
  ];

  build-system = [
    poetry-core
    poetry-dynamic-versioning
  ];

  dependencies = [
    blackrenderer
    fonttools
    freetype-py
    gflanguages
    glyphsets
    jinja2
    ninja
    pillow
    protobuf
    pyahocorasick
    python-bidi
    selenium
    tqdm
    uharfbuzz
    unicodedata2
    youseedee
    numpy
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    # requires internet
    "test_download_google_fonts_family_to_file"
    "test_download_google_fonts_family_to_bytes"
    "test_download_google_fonts_family_not_existing"
    "test_download_latest_github_release"
  ];

  disabledTestPaths = [
    # Want the files downloaded by the tests above
    "tests/test_functional.py"
    "tests/test_html.py"
    "tests/test_matcher.py"
    "tests/test_font.py"
  ];

  meta = {
    description = "Font comparison tool that will not stop until your fonts are exhaustively compared";
    homepage = "https://github.com/googlefonts/diffenator2";
    changelog = "https://github.com/googlefonts/diffenator2/releases/tag/${src.tag}";
    license = lib.licenses.asl20;
    mainProgram = "diffenator2";
    maintainers = with lib.maintainers; [ jopejoe1 ];
  };
}