diff --git a/pkgs/development/python-modules/python-fontconfig/default.nix b/pkgs/development/python-modules/python-fontconfig/default.nix new file mode 100644 index 000000000000..a8faadffc112 --- /dev/null +++ b/pkgs/development/python-modules/python-fontconfig/default.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonPackage, fetchPypi, fontconfig, python, freefont_ttf, makeFontsConf }: + +let + fontsConf = makeFontsConf { + fontDirectories = [ freefont_ttf ]; + }; +in buildPythonPackage rec { + pname = "Python-fontconfig"; + version = "0.5.1"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "154rfd0ygcbj9y8m32n537b457yijpfx9dvmf76vi0rg4ikf7kxp"; + }; + + buildInputs = [ fontconfig ]; + + checkPhase = '' + export FONTCONFIG_FILE=${fontsConf}; + echo y | ${python.interpreter} test/test.py + ''; + + meta = { + homepage = https://github.com/Vayn/python-fontconfig; + description = "Python binding for Fontconfig"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ gnidorah ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0f4cdf691715..daee60ccec43 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -535,6 +535,8 @@ in { }; } else null; + python-fontconfig = callPackage ../development/python-modules/python-fontconfig { }; + funcsigs = callPackage ../development/python-modules/funcsigs { }; APScheduler = callPackage ../development/python-modules/APScheduler { };