1{ lib, buildPythonPackage, fetchPypi, fontconfig, python, cython, freefont_ttf, makeFontsConf }: 2 3let 4 fontsConf = makeFontsConf { 5 fontDirectories = [ freefont_ttf ]; 6 }; 7in buildPythonPackage rec { 8 pname = "Python-fontconfig"; 9 version = "0.5.1"; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "154rfd0ygcbj9y8m32n537b457yijpfx9dvmf76vi0rg4ikf7kxp"; 14 }; 15 16 buildInputs = [ fontconfig ]; 17 nativeBuildInputs = [ cython ]; 18 19 preBuild = '' 20 ${python.interpreter} setup.py build_ext -i 21 ''; 22 23 checkPhase = '' 24 export FONTCONFIG_FILE=${fontsConf}; 25 echo y | ${python.interpreter} test/test.py 26 ''; 27 28 meta = { 29 homepage = "https://github.com/Vayn/python-fontconfig"; 30 description = "Python binding for Fontconfig"; 31 license = lib.licenses.gpl3; 32 maintainers = with lib.maintainers; [ ]; 33 }; 34}