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