python3Packages.weasyprint: restore overriding of fontconfig file

This builds on the fix for Darwin from
https://github.com/NixOS/nixpkgs/pull/207348, but letting the variable
be configurable in each environment. This avoids needing to specialize
and rebuild the derivation just to alter the fontconfig.
This commit is contained in:
Johannes Emerich 2023-09-09 12:27:39 +02:00 committed by Johannes Emerich
parent f1f9992298
commit b4f34aaacc

View File

@ -79,9 +79,9 @@ buildPythonPackage rec {
FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
# Fontconfig error: Cannot load default config file: No such file: (null)
# Set env variable explicitly for Darwin, but allow overriding when invoking directly
makeWrapperArgs = [
"--set FONTCONFIG_FILE ${FONTCONFIG_FILE}"
"--set-default FONTCONFIG_FILE ${FONTCONFIG_FILE}"
];
postPatch = ''