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