depot/third_party/nixpkgs/pkgs/development/python-modules/python-fontconfig/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 lines
848 B
Nix

{ lib, buildPythonPackage, fetchPypi, fontconfig, python, cython, freefont_ttf, makeFontsConf }:
let
fontsConf = makeFontsConf {
fontDirectories = [ freefont_ttf ];
};
in buildPythonPackage rec {
pname = "Python-fontconfig";
version = "0.5.1";
src = fetchPypi {
inherit pname version;
sha256 = "154rfd0ygcbj9y8m32n537b457yijpfx9dvmf76vi0rg4ikf7kxp";
};
buildInputs = [ fontconfig ];
nativeBuildInputs = [ cython ];
preBuild = ''
${python.interpreter} setup.py build_ext -i
'';
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 ];
};
}