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.10.3";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-Vt4m18dfFk7qA+KLwRtMdpxo1wX6GG38rrVsJ/mkzAw=";
22 extension = "zip";
23 };
24
25 nativeBuildInputs = [ setuptools-scm ];
26
27 propagatedBuildInputs = [
28 fonttools
29 ] ++ fonttools.optional-dependencies.ufo ++ fonttools.optional-dependencies.unicode;
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "defcon" ];
34
35 passthru.optional-dependencies = {
36 pens = [ fontpens ];
37 lxml = [ fonttools ] ++ fonttools.optional-dependencies.lxml;
38 };
39
40 meta = with lib; {
41 description = "A set of UFO based objects for use in font editing applications";
42 homepage = "https://github.com/robotools/defcon";
43 changelog = "https://github.com/robotools/defcon/releases/tag/${version}";
44 license = licenses.mit;
45 maintainers = with maintainers; [ sternenseemann ];
46 };
47}