1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cu2qu, 6 defcon, 7 fontfeatures, 8 fonttools, 9 glyphslib, 10 openstep-plist, 11 orjson, 12 poetry-core, 13 pytestCheckHook, 14 ufolib2, 15}: 16 17buildPythonPackage rec { 18 pname = "babelfont"; 19 version = "3.0.1"; 20 21 # PyPI source tarballs omit tests, fetch from Github instead 22 src = fetchFromGitHub { 23 owner = "simoncozens"; 24 repo = pname; 25 rev = "v${version}"; 26 hash = "sha256-1DHcJDVaCgIAODyf5UUrXej8x3ySD4+6/KtxuF2yFV4="; 27 }; 28 29 pyproject = true; 30 31 propagatedBuildInputs = [ 32 cu2qu 33 fontfeatures 34 fonttools 35 glyphslib 36 openstep-plist 37 orjson 38 ufolib2 39 ]; 40 nativeBuildInputs = [ poetry-core ]; 41 42 doCheck = true; 43 nativeCheckInputs = [ 44 defcon 45 pytestCheckHook 46 ]; 47 48 meta = with lib; { 49 description = "Python library to load, examine, and save fonts in a variety of formats"; 50 mainProgram = "babelfont"; 51 homepage = "https://github.com/simoncozens/babelfont"; 52 license = licenses.bsd3; 53 maintainers = with maintainers; [ danc86 ]; 54 }; 55}