1{ lib
2, attrs
3, buildPythonPackage
4, cattrs
5, exceptiongroup
6, fetchFromGitHub
7, fonttools
8, fs
9, importlib-metadata
10, poetry-core
11, pytestCheckHook
12, pythonOlder
13, ufo2ft
14, ufoLib2
15}:
16
17buildPythonPackage rec {
18 pname = "statmake";
19 version = "0.6.0";
20 format = "pyproject";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "daltonmaag";
26 repo = pname;
27 rev = "refs/tags/v${version}";
28 hash = "sha256-3BZ71JVvj7GCojM8ycu160viPj8BLJ1SiW86Df2fzsw=";
29 };
30
31 nativeBuildInputs = [
32 poetry-core
33 ];
34
35 propagatedBuildInputs = [
36 attrs
37 cattrs
38 fonttools
39 # required by fonttools[ufo]
40 fs
41 ] ++ lib.optionals (pythonOlder "3.11") [
42 exceptiongroup
43 ] ++ lib.optionals (pythonOlder "3.8") [
44 importlib-metadata
45 ];
46
47 nativeCheckInputs = [
48 pytestCheckHook
49 ufo2ft
50 ufoLib2
51 ];
52
53 pythonImportsCheck = [
54 "statmake"
55 ];
56
57 disabledTests = [
58 # Test requires an update as later cattrs is present in Nixpkgs
59 # https://github.com/daltonmaag/statmake/issues/42
60 "test_load_stylespace_broken_range"
61 ];
62
63 meta = with lib; {
64 description = "Applies STAT information from a Stylespace to a variable font";
65 homepage = "https://github.com/daltonmaag/statmake";
66 changelog = "https://github.com/daltonmaag/statmake/releases/tag/v${version}";
67 license = licenses.mit;
68 maintainers = with maintainers; [ ];
69 };
70}