1{ stdenv
2, lib
3, buildPythonPackage
4, fetchpatch
5, fetchPypi
6, fonttools
7, pytestCheckHook
8, setuptools-scm
9, wheel
10}:
11
12buildPythonPackage rec {
13 pname = "cffsubr";
14 version = "0.2.9.post1";
15 format = "pyproject";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-azFBLc9JyPqEZkvahn4u3cVbb+b6aW/yU8TxOp/y/Fw=";
20 };
21
22 patches = [
23 # https://github.com/adobe-type-tools/cffsubr/pull/23
24 (fetchpatch {
25 name = "remove-setuptools-git-ls-files.patch";
26 url = "https://github.com/adobe-type-tools/cffsubr/commit/887a6a03b1e944b82fcb99b797fbc2f3a64298f0.patch";
27 hash = "sha256-LuyqBtDrKWwCeckr+YafZ5nfVw1XnELwFI6X8bGomhs=";
28 })
29 ];
30
31 nativeBuildInputs = [
32 setuptools-scm
33 wheel
34 ];
35
36 propagatedBuildInputs = [
37 fonttools
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 ];
43
44 pythonImportsCheck = [ "cffsubr" ];
45
46 meta = with lib; {
47 broken = stdenv.isDarwin;
48 description = "Standalone CFF subroutinizer based on AFDKO tx";
49 homepage = "https://github.com/adobe-type-tools/cffsubr";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ ];
52 };
53}