2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
fetchpatch,
|
|
|
|
fetchPypi,
|
|
|
|
setuptools-scm,
|
|
|
|
fonttools,
|
|
|
|
pytestCheckHook,
|
|
|
|
wheel,
|
2022-02-10 20:34:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "compreffor";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.5.5";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-9NMmIJC8Q4hRC/H2S7OrgoWSQ9SRIPHxHvZpPrPCvHo=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/googlefonts/compreffor/pull/153
|
|
|
|
(fetchpatch {
|
|
|
|
name = "remove-setuptools-git-ls-files.patch";
|
|
|
|
url = "https://github.com/googlefonts/compreffor/commit/10f563564390568febb3ed1d0f293371cbd86953.patch";
|
|
|
|
hash = "sha256-wNQMJFJXTFILGzAgzUXzz/rnK67/RU+exYP6MhEQAkA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
cython
|
2022-02-10 20:34:41 +00:00
|
|
|
setuptools-scm
|
2023-08-22 20:05:09 +00:00
|
|
|
wheel
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ fonttools ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
# Tests cannot seem to open the cpython module.
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "compreffor" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CFF table subroutinizer for FontTools";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "compreffor";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://github.com/googlefonts/compreffor";
|
|
|
|
license = licenses.asl20;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
}
|