Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216{ lib, fetchFromGitHub, buildPythonPackage, pytestCheckHook, setuptools, setuptools-scm, absl-py, afdko, axisregistry, beautifulsoup4, black, brotli, coreutils, diffenator2, ffmpeg-python, fontfeatures, fontmake, fonttools, gflanguages, gfmetadata, gfsubsets, glyphsets, glyphslib, harfbuzz, jinja2, nanoemoji, networkx, ninja, opentype-feature-freezer, ots-python, packaging, paintcompiler, pillow, protobuf, pycairo, pygit2, pygithub, pytest, pyyaml, requests, rich, ruamel-yaml, strictyaml, tabulate, ttfautohint-py, ufomerge, unidecode, vharfbuzz, vttlib, gitpython, freetype-py, python, gitUpdater,}:
let fontmake' = python.withPackages (ps: [ ps.fontmake ] ++ ps.fontmake.optional-dependencies.json); fonttools' = python.withPackages (ps: [ ps.fonttools ] ++ ps.fonttools.optional-dependencies.ufo);inbuildPythonPackage rec { pname = "gftools"; version = "0.10.7"; pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub { owner = "googlefonts"; repo = "gftools"; tag = "v${version}"; hash = "sha256-OBPVr5hM4SMlCP1aBAOt/fwV4/bFQwgqTQEu0feUYtI="; };
postPatch = '' substituteInPlace \ Lib/gftools/builder/operations/{buildTTF,glyphs2ds,buildVariable,buildOTF}.py \ --replace-fail '"fontmake' '"${lib.getExe' fontmake' "fontmake"}'
substituteInPlace \ Lib/gftools/builder/operations/instantiateUfo.py \ --replace-fail "'fontmake" "'${lib.getExe' fontmake' "fontmake"}"
substituteInPlace \ Lib/gftools/builder/operations/{compress,subspace}.py \ --replace-fail '"fonttools' '"${lib.getExe' fonttools' "fonttools"}'
substituteInPlace \ Lib/gftools/builder/operations/hbsubset.py \ --replace-fail '"pyftsubset"' '"${lib.getExe' fonttools' "pyftsubset"}"' \ --replace-fail '"hb-subset"' '"${lib.getExe' harfbuzz "hb-subset"}"'
substituteInPlace \ Lib/gftools/builder/operations/autohintOTF.py \ --replace-fail 'otfautohint' '${lib.getExe' afdko "otfautohint"}'
substituteInPlace \ Lib/gftools/builder/operations/paintcompiler.py \ --replace-fail '"paintcompiler' '"${lib.getExe paintcompiler}'
substituteInPlace \ Lib/gftools/builder/operations/featureFreeze.py \ --replace-fail '"pyftfeatfreeze' '"${lib.getExe opentype-feature-freezer}'
substituteInPlace \ Lib/gftools/builder/operations/copy.py \ --replace-fail '"cp' '"${lib.getExe' coreutils "cp"}'
substituteInPlace \ Lib/gftools/builder/operations/{fix,remap,autohint,buildStat,addSubset,remapLayout,buildVTT,buildAvar2}.py \ --replace-fail '"gftools' '"${placeholder "out"}/bin/gftools'
substituteInPlace \ Lib/gftools/builder/operations/rename.py \ --replace-fail "'gftools" "'${placeholder "out"}t/bin/gftools" '';
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
pythonRelaxDeps = [ "protobuf" "pygit2" ];
build-system = [ setuptools setuptools-scm ];
dependencies = [ absl-py afdko axisregistry beautifulsoup4 brotli ffmpeg-python fontfeatures fontmake fonttools gflanguages gfmetadata gfsubsets glyphsets glyphslib jinja2 nanoemoji networkx ninja ots-python packaging pillow protobuf pygit2 pygithub pyyaml requests rich ruamel-yaml strictyaml tabulate ttfautohint-py ufomerge unidecode vharfbuzz vttlib gitpython ] ++ fonttools.optional-dependencies.ufo ++ fontmake.optional-dependencies.json;
optional-dependencies = { qa = [ diffenator2 pycairo freetype-py ]; test = [ black pytest ]; };
nativeCheckInputs = [ pytestCheckHook ];
disabledTestPaths = [ # Wants none existing module "bin/test_args.py" # Requires internet "tests/push/test_items.py" "tests/test_gfgithub.py" "tests/test_usage.py" "tests/push/test_servers.py" # Can't find directory "tests/test_builder.py" "tests/test_dependencies.py" "tests/test_fix.py" ];
pythonImportsCheck = [ "gftools" ];
passthru.updateScript = gitUpdater { rev-prefix = "v"; # Miss Released version ignoredVersions = "0.9991"; };
meta = { description = "Misc tools for working with the Google Fonts library"; homepage = "https://github.com/googlefonts/gftools"; changelog = "https://github.com/googlefonts/gftools/releases/tag/${src.tag}"; license = lib.licenses.asl20; mainProgram = "gftools"; maintainers = with lib.maintainers; [ jopejoe1 ]; };}