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