1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{
stdenv,
lib,
afdko,
buildPythonPackage,
cmake,
distutils,
fetchPypi,
fonttools,
ninja,
pytestCheckHook,
scikit-build,
setuptools,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "cffsubr";
version = "0.3.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-d0UVC9uBZ5+s3RHB87hwlsT029SVfo/Ou4jEVoeVLvs=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'afdko_output_dir = os.path.join(afdko_root_dir, "build", "bin")' \
'afdko_output_dir = "${lib.getBin afdko}/bin"' \
--replace-fail 'build_cmd=build_release_cmd' 'build_cmd="true"'
'';
build-system = [
cmake
distutils
ninja
scikit-build
setuptools
setuptools-scm
];
dontUseCmakeConfigure = true;
dependencies = [ fonttools ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "cffsubr" ];
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
changelog = "https://github.com/adobe-type-tools/cffsubr/releases/tag/v${version}";
description = "Standalone CFF subroutinizer based on AFDKO tx";
mainProgram = "cffsubr";
homepage = "https://github.com/adobe-type-tools/cffsubr";
license = licenses.asl20;
maintainers = [ ];
};
}
|