Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
4.7 kB · 212 lines
Nix
at gcc-offload
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213{ lib, fetchFromGitHub, buildPythonPackage, pytestCheckHook, setuptools, setuptools-scm, absl-py, afdko, axisregistry, babelfont, beautifulsoup4, black, brotli, bumpfontversion, coreutils, diffenator2, font-v, fontbakery, fontfeatures, fontmake, fonttools, gflanguages, 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, skia-pathops, statmake, strictyaml, tabulate, ttfautohint-py, ufomerge, unidecode, vharfbuzz, vttlib, python,}:
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.9.76"; pyproject = true;
src = fetchFromGitHub { owner = "googlefonts"; repo = "gftools"; tag = "v${version}"; hash = "sha256-UQcQiPStkXKYAy6yK7K8sjkQiABVuqcGllOYyxUjxfA="; };
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}.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 babelfont beautifulsoup4 brotli bumpfontversion font-v fontfeatures fontmake fonttools gflanguages gfsubsets glyphsets glyphslib jinja2 nanoemoji networkx ninja ots-python packaging pillow protobuf pygit2 pygithub pyyaml requests rich ruamel-yaml setuptools skia-pathops statmake strictyaml tabulate ttfautohint-py ufomerge unidecode vharfbuzz vttlib ] ++ fonttools.optional-dependencies.ufo ++ fontmake.optional-dependencies.json;
optional-dependencies = { qa = [ diffenator2 fontbakery pycairo ]; test = [ black pytest ]; };
nativeCheckInputs = [ pytestCheckHook ];
disabledTestPaths = [ # Wants none exsiting 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" ];
meta = with lib; { description = "Misc tools for working with the Google Fonts library"; homepage = "https://github.com/googlefonts/gftools"; changelog = "https://github.com/googlefonts/gftools/releases/tag/v${version}"; license = licenses.asl20; mainProgram = "gftools"; maintainers = with maintainers; [ jopejoe1 ]; };}