xvfb-run: only set fontconfig if not specified

Nix injects the environment variable FONTCONFIG_PATH to xvfb-run, in
order to provide some miminmal font support to applications via
fontconfig.

This change only sets this environment variable if it is not given
already. This allows the user to inject their own font configuration,
i.e. allows them to make extra fonts available to the executed
application.

If not set, the minimal font configuration will still be provided.
This commit is contained in:
tropf 2023-10-12 14:02:04 +02:00 committed by Artturin
parent 49523dec15
commit 920bc7a2fd

View file

@ -38,7 +38,7 @@ stdenvNoCC.mkDerivation rec {
chmod a+x $out/bin/xvfb-run
patchShebangs $out/bin/xvfb-run
wrapProgram $out/bin/xvfb-run \
--set FONTCONFIG_FILE "${fontsConf}" \
--set-default FONTCONFIG_FILE "${fontsConf}" \
--prefix PATH : ${lib.makeBinPath [ getopt xorgserver xauth which util-linux gawk coreutils ]}
'';