Change:
<!-- Note that these are hard requirements --<!-- You can use the "Go to file" functionality on GitHub to find the package Then you can go to the history for this package Find the latest "packagename: oldversion -newversion" commit The "newversion" is the current version of the package --- <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- name: <!-- The current version can be found easily with the same process as above for checking the master branch If an open PR is present for the package, take this version as the current one and link to the PR --current version: 54.3 desired version: 57.0 <!-- Search your package here: If no maintainer is listed for your package, tag the person that last updated the package --maintainers: Please tag this issue in your PR.

Discussion:
{ lib , buildPythonPackage <del> , fetchpatch </del> , fetchPypi <del> , isPy3k , pytestCheckHook , coverage </del> <ins> , flit-core </ins> , ghostscript , pillow <ins> , pytestCheckHook , pythonOlder </ins> }: buildPythonPackage rec { pname = "pydyf"; <del> version = "0.1.2"; disabled = !isPy3k; </del> <ins> version = "0.5.0"; format = "pyproject"; disabled = pythonOlder "3.7"; </ins> src = fetchPypi { <del> inherit version; pname = "pydyf"; sha256 = "sha256-Hi9d5IF09QXeAlp9HnzwG73ZQiyoq5RReCvwDuF4YCw="; </del> <ins> inherit pname version; hash = "sha256-UedRrhUEA3wfwfSBURkTewEYAs1fbDU52wZsRVsUp+E="; </ins> }; <del> patches = [ # Fix tests for Ghostscript 9.56 # Remove after v0.1.3 has been released (fetchpatch { url = "https://github.com/CourtBouillon/pydyf/commit/d4c34823f1d15368753c9c26f7acc7a24fc2d979.patch"; sha256 = "sha256-2hHZW/q5CbStbpSJYbm3b23qKXANEb5jbPGQ83uHC+Q="; }) ]; </del> postPatch = '' substituteInPlace pyproject.toml  --replace "--isort --flake8 --cov --no-cov-on-fail" "" ''; <ins> nativeBuildInputs = [ flit-core ]; </ins> checkInputs = [ <del> pytestCheckHook coverage </del> ghostscript pillow <ins> pytestCheckHook ]; pythonImportsCheck = [ "pydyf" </ins> ]; meta = with lib; { <del> homepage = "https://doc.courtbouillon.org/pydyf/stable/"; </del> description = "Low-level PDF generator written in Python and based on PDF specification 1.7"; <ins> homepage = "https://doc.courtbouillon.org/pydyf/stable/"; </ins> license = licenses.bsd3; maintainers = with maintainers; [ rprecenth ]; };

<del> { buildPythonPackage , fetchPypi , fetchpatch , pytestCheckHook </del> <ins> { lib , stdenv , buildPythonPackage </ins> , cairosvg <del> , flit-core , fonttools , pydyf , pyphen </del> , cffi , cssselect2 <del> , html5lib , tinycss2 </del> <ins> , fetchPypi , flit-core , fontconfig , fonttools , ghostscript </ins> , glib , harfbuzz <ins> , html5lib </ins> , pango <del> , fontconfig , lib , stdenv , ghostscript , isPy3k , substituteAll </del> , pillow <ins> , pydyf , pyphen , pytestCheckHook , pythonOlder , substituteAll , tinycss2 </ins> }: buildPythonPackage rec { pname = "weasyprint"; <del> version = "54.3"; disabled = !isPy3k; </del> <ins> version = "57.0"; </ins> format = "pyproject"; <ins> disabled = pythonOlder "3.7"; </ins> src = fetchPypi { inherit version; pname = "weasyprint"; <del> sha256 = "sha256-4E2gQGMFZsRMqiAgM/B/hYdl9TZwkEWoCXOfPQSOidY="; </del> <ins> hash = "sha256-e29cwTgZ6afYdIwdvw6NJET3pIGKmDOfgtzKqCK/kRs="; </ins> }; patches = [

pangocairo = "${pango.out}/lib/libpangocairo-1.0${stdenv.hostPlatform.extensions.sharedLibrary}"; harfbuzz = "${harfbuzz.out}/lib/libharfbuzz${stdenv.hostPlatform.extensions.sharedLibrary}"; }) <del> # Disable tests for new Ghostscript # Remove when next version is released (fetchpatch { url = "https://github.com/Kozea/WeasyPrint/commit/e544398b00d76bc0317ea7e2abe40dc46b380910.patch"; sha256 = "sha256-oQO3j9Mo1x98WaLPROxsOn0qkeYRJrCx5QWWKoHvabE="; }) </del> ]; nativeBuildInputs = [

export HOME=$TMPDIR ''; <ins> pythonImportsCheck = [ "weasyprint" ]; </ins> meta = with lib; { <del> homepage = "https://weasyprint.org/"; </del> description = "Converts web documents to PDF"; <ins> homepage = "https://weasyprint.org/"; </ins> license = licenses.bsd3; maintainers = with maintainers; [ elohmeier ]; };

diff --git a/weasyprint/text/ffi.py b/weasyprint/text/ffi.py <del> index 0734cbea..22e31a5e 100644 </del> <ins> index 09f614aad..cbe9a73dd 100644 </ins> --- a/weasyprint/text/ffi.py +++ b/weasyprint/text/ffi.py <del> @@ -387,22 +387,11 @@ def _dlopen(ffi, *names): return ffi.dlopen(names[0])  # pragma: no cover </del> <ins> @@ -415,22 +415,11 @@ def _dlopen(ffi, *names): with suppress((OSError, FileNotFoundError)): os.add_dll_directory(dll_directory) </ins> -gobject = _dlopen( -    ffi, 'gobject-2.0-0', 'gobject-2.0', 'libgobject-2.0-0',

-    'libharfbuzz-0.dll') -fontconfig = _dlopen( -    ffi, 'fontconfig-1', 'fontconfig', 'libfontconfig', 'libfontconfig.so.1', <del> -    'libfontconfig-1.dylib', 'libfontconfig-1.dll') </del> <ins> -    'libfontconfig.1.dylib', 'libfontconfig-1.dll') </ins> -pangoft2 = _dlopen( -    ffi, 'pangoft2-1.0-0', 'pangoft2-1.0', 'libpangoft2-1.0-0', -    'libpangoft2-1.0.so.0', 'libpangoft2-1.0.dylib', 'libpangoft2-1.0-0.dll')

+fontconfig = _dlopen(ffi, '@fontconfig@') +pangoft2 = _dlopen(ffi, '@pangoft2@') <del> gobject.g_type_init() </del> <ins> gobject.g_type_init() </ins>  No newline at end of file