1{
2 lib,
3 buildPythonPackage,
4 defcon,
5 fetchPypi,
6 fonttools,
7 gflanguages,
8 glyphslib,
9 pytestCheckHook,
10 pythonOlder,
11 pyyaml,
12 requests,
13 setuptools-scm,
14 setuptools,
15 tabulate,
16 unicodedata2,
17 youseedee,
18}:
19
20buildPythonPackage rec {
21 pname = "glyphsets";
22 version = "1.1.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchPypi {
28 inherit pname version;
29 hash = "sha256-jza6VQ3PZAQPku2hyo0KeO59r64Q9TpqLCI0dIX/URU=";
30 };
31
32 postPatch = ''
33 substituteInPlace setup.py \
34 --replace-fail "setuptools_scm>=8.1.0,<8.2" setuptools_scm
35 '';
36
37 env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
38
39 build-system = [
40 setuptools
41 setuptools-scm
42 ];
43
44 dependencies = [
45 defcon
46 fonttools
47 gflanguages
48 glyphslib
49 pyyaml
50 requests
51 tabulate
52 unicodedata2
53 youseedee
54 ];
55
56 nativeCheckInputs = [ pytestCheckHook ];
57
58 preCheck = ''
59 export PATH="$out/bin:$PATH"
60 '';
61
62 disabledTests = [
63 # This "test" just tries to connect to PyPI and look for newer releases. Not needed.
64 "test_dependencies"
65 # 616 instead of 617 glyphs in a glyphset
66 "test_definitions"
67 ];
68
69 meta = with lib; {
70 description = "Google Fonts glyph set metadata";
71 homepage = "https://github.com/googlefonts/glyphsets";
72 changelog = "https://github.com/googlefonts/glyphsets/blob/v${version}/CHANGELOG.md";
73 license = licenses.asl20;
74 maintainers = with maintainers; [ danc86 ];
75 mainProgram = "glyphsets";
76 };
77}