1{ lib, buildPythonPackage, fetchPypi, fontconfig, python, 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 name = "${pname}-${version}"; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "154rfd0ygcbj9y8m32n537b457yijpfx9dvmf76vi0rg4ikf7kxp"; 15 }; 16 17 buildInputs = [ fontconfig ]; 18 19 checkPhase = '' 20 export FONTCONFIG_FILE=${fontsConf}; 21 echo y | ${python.interpreter} test/test.py 22 ''; 23 24 meta = { 25 homepage = https://github.com/Vayn/python-fontconfig; 26 description = "Python binding for Fontconfig"; 27 license = lib.licenses.gpl3; 28 maintainers = with lib.maintainers; [ gnidorah ]; 29 }; 30}