2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
attrs,
|
|
|
|
buildPythonPackage,
|
|
|
|
cattrs,
|
|
|
|
exceptiongroup,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fonttools,
|
|
|
|
fs,
|
|
|
|
importlib-metadata,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
ufo2ft,
|
|
|
|
ufolib2,
|
2022-02-10 20:34:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "statmake";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "0.6.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "daltonmaag";
|
2022-06-16 17:23:12 +00:00
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-3BZ71JVvj7GCojM8ycu160viPj8BLJ1SiW86Df2fzsw=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs =
|
|
|
|
[
|
|
|
|
attrs
|
|
|
|
cattrs
|
|
|
|
fonttools
|
|
|
|
# required by fonttools[ufo]
|
|
|
|
fs
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonOlder "3.11") [ exceptiongroup ]
|
|
|
|
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
ufo2ft
|
2024-01-13 08:15:51 +00:00
|
|
|
ufolib2
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "statmake" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test requires an update as later cattrs is present in Nixpkgs
|
|
|
|
# https://github.com/daltonmaag/statmake/issues/42
|
|
|
|
"test_load_stylespace_broken_range"
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Applies STAT information from a Stylespace to a variable font";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "statmake";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://github.com/daltonmaag/statmake";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/daltonmaag/statmake/releases/tag/v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = licenses.mit;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
}
|