1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchPypi,
6 setuptools-scm,
7 fonttools,
8 fontpens,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "defcon";
14 version = "0.12.2";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-Jd/n/QFSzPKSyxkNGSikfViImcILBGhUKT4DnhyT5eA=";
22 };
23
24 nativeBuildInputs = [ setuptools-scm ];
25
26 propagatedBuildInputs = [
27 fonttools
28 ]
29 ++ fonttools.optional-dependencies.ufo
30 ++ fonttools.optional-dependencies.unicode;
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 pythonImportsCheck = [ "defcon" ];
35
36 optional-dependencies = {
37 pens = [ fontpens ];
38 lxml = [ fonttools ] ++ fonttools.optional-dependencies.lxml;
39 };
40
41 meta = with lib; {
42 description = "Set of UFO based objects for use in font editing applications";
43 homepage = "https://github.com/robotools/defcon";
44 changelog = "https://github.com/robotools/defcon/releases/tag/${version}";
45 license = licenses.mit;
46 maintainers = with maintainers; [ sternenseemann ];
47 };
48}