Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.5 kB · 111 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{ lib, stdenv, buildPythonPackage, pythonOlder, isPyPy, fetchFromGitHub, setuptools, setuptools-scm, lxml, brotli, brotlicffi, zopfli, unicodedata2, lz4, scipy, munkres, pycairo, matplotlib, sympy, xattr, skia-pathops, uharfbuzz, pytest7CheckHook,}:
buildPythonPackage rec { pname = "fonttools"; version = "4.59.0"; pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub { owner = "fonttools"; repo = "fonttools"; tag = version; hash = "sha256-f3iedVwwh98XkFzPJ/+XZ2n4pcDXDoPlQki+neGVuXE="; };
build-system = [ setuptools setuptools-scm ];
optional-dependencies = let extras = { ufo = [ ]; lxml = [ lxml ]; woff = [ (if isPyPy then brotlicffi else brotli) zopfli ]; unicode = lib.optional (pythonOlder "3.13") unicodedata2; graphite = [ lz4 ]; interpolatable = [ pycairo (if isPyPy then munkres else scipy) ]; plot = [ matplotlib ]; symfont = [ sympy ]; type1 = lib.optional stdenv.hostPlatform.isDarwin xattr; pathops = [ skia-pathops ]; repacker = [ uharfbuzz ]; }; in extras // { all = lib.concatLists (lib.attrValues extras); };
nativeCheckInputs = [ # test suite fails with pytest>=8.0.1 # https://github.com/fonttools/fonttools/issues/3458 pytest7CheckHook ] ++ lib.concatLists ( lib.attrVals ( [ "woff" # "interpolatable" is not included because it only contains 2 tests at the time of writing but adds 270 extra dependencies "ufo" ] ++ lib.optionals (!skia-pathops.meta.broken) [ "pathops" # broken ] ++ [ "repacker" ] ) optional-dependencies );
pythonImportsCheck = [ "fontTools" ];
preCheck = '' # tests want to execute the "fonttools" executable from $PATH export PATH="$out/bin:$PATH" '';
# Timestamp tests have timing issues probably related # to our file timestamp normalization disabledTests = [ "test_recalc_timestamp_ttf" "test_recalc_timestamp_otf" "test_ttcompile_timestamp_calcs" ];
meta = with lib; { homepage = "https://github.com/fonttools/fonttools"; description = "Library to manipulate font files from Python"; changelog = "https://github.com/fonttools/fonttools/blob/${src.tag}/NEWS.rst"; license = licenses.mit; maintainers = [ maintainers.sternenseemann ]; };}