Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch2, 6 pytestCheckHook, 7 fontmath, 8 fonttools, 9 glyphslib, 10 setuptools, 11 setuptools-scm, 12 skia-pathops, 13 ttfautohint-py, 14 ufo2ft, 15 ufolib2, 16}: 17 18buildPythonPackage rec { 19 pname = "fontmake"; 20 version = "3.10.0"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "googlefonts"; 25 repo = "fontmake"; 26 tag = "v${version}"; 27 hash = "sha256-ZlK8QyZ5cIEphFiZXMV/Z5pL9H62X2UwLBtpwLGpUMQ="; 28 }; 29 30 patches = [ 31 # Update to FontTools 4.55 and glyphsLib 6.9.5 32 # https://github.com/googlefonts/fontmake/pull/1133 33 (fetchpatch2 { 34 url = "https://github.com/googlefonts/fontmake/commit/ca96d25faa67638930ddc7f9bd1ab218a76caf22.patch"; 35 includes = [ "tests/test_main.py" ]; 36 hash = "sha256-vz+KeWiGCpUdX5HaXDdyyUCbuMkIylB364j6cD7xR1E="; 37 }) 38 ]; 39 40 build-system = [ 41 setuptools 42 setuptools-scm 43 ]; 44 45 dependencies = [ 46 fontmath 47 fonttools 48 glyphslib 49 ufo2ft 50 ufolib2 51 ] 52 ++ fonttools.optional-dependencies.ufo 53 ++ fonttools.optional-dependencies.lxml 54 ++ fonttools.optional-dependencies.unicode; 55 56 optional-dependencies = { 57 pathops = [ skia-pathops ]; 58 autohint = [ ttfautohint-py ]; 59 json = ufolib2.optional-dependencies.json; 60 repacker = fonttools.optional-dependencies.repacker; 61 }; 62 63 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.autohint; 64 65 pythonImportsCheck = [ "fontmake" ]; 66 67 meta = { 68 description = "Compiles fonts from various sources (.glyphs, .ufo, designspace) into binaries formats (.otf, .ttf)"; 69 homepage = "https://github.com/googlefonts/fontmake"; 70 changelog = "https://github.com/googlefonts/fontmake/releases/tag/${src.tag}"; 71 license = lib.licenses.asl20; 72 maintainers = [ lib.maintainers.BarinovMaxim ]; 73 }; 74}