1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 defcon,
6 fonttools,
7 gflanguages,
8 glyphslib,
9 pytestCheckHook,
10 pyyaml,
11 requests,
12 setuptools,
13 setuptools-scm,
14 unicodedata2,
15}:
16
17buildPythonPackage rec {
18 pname = "glyphsets";
19 version = "1.0.0";
20 pyproject = true;
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-fa+W1IGIZcn1P1xNKm1Yb/TOuf4QdDVnIvlDkOLOcLY=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace-fail "setuptools_scm>=8.0.4,<8.1" "setuptools_scm"
30 '';
31
32 build-system = [
33 setuptools
34 setuptools-scm
35 ];
36
37 dependencies = [
38 defcon
39 fonttools
40 gflanguages
41 glyphslib
42 pyyaml
43 requests
44 unicodedata2
45 ];
46
47 nativeCheckInputs = [ pytestCheckHook ];
48
49 preCheck = ''
50 export PATH="$out/bin:$PATH"
51 '';
52
53 disabledTests = [
54 # This "test" just tries to connect to PyPI and look for newer releases. Not needed.
55 "test_dependencies"
56 ];
57
58 meta = with lib; {
59 description = "Google Fonts glyph set metadata";
60 mainProgram = "glyphsets";
61 homepage = "https://github.com/googlefonts/glyphsets";
62 license = licenses.asl20;
63 maintainers = with maintainers; [ danc86 ];
64 };
65}