2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, attrs
|
|
|
|
, fonttools
|
|
|
|
, pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
, setuptools-scm
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
# optionals
|
|
|
|
, cattrs
|
|
|
|
, lxml
|
|
|
|
, orjson
|
|
|
|
, msgpack
|
2022-02-10 20:34:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-01-13 08:15:51 +00:00
|
|
|
pname = "ufolib2";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.16.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-01-13 08:15:51 +00:00
|
|
|
pname = "ufoLib2";
|
|
|
|
inherit version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-SfDcf3LMrP5/rv4NU9N5cdRWZNiwVj7zaVb6e/pVor0=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
fonttools
|
2023-01-20 10:41:00 +00:00
|
|
|
] ++ fonttools.optional-dependencies.ufo;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
lxml = [ lxml ];
|
|
|
|
converters = [ cattrs ];
|
|
|
|
json = [ cattrs orjson ];
|
|
|
|
msgpack = [ cattrs msgpack ];
|
|
|
|
};
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
2023-01-20 10:41:00 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
pythonImportsCheck = [ "ufoLib2" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to deal with UFO font sources";
|
|
|
|
homepage = "https://github.com/fonttools/ufoLib2";
|
|
|
|
license = licenses.mit;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
}
|