From 3a1d1f70cec35f3d774bc44d8a49a2dab174edf3 Mon Sep 17 00:00:00 2001 From: eveeifyeve <88671402+Eveeifyeve@users.noreply.github.com> Date: Mon, 30 Mar 2026 23:31:39 +1100 Subject: [PATCH] installFonts: add warning about webfonts when woff/woff2 file are present --- pkgs/build-support/setup-hooks/install-fonts.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/install-fonts.sh b/pkgs/build-support/setup-hooks/install-fonts.sh index 27f9aeb82cd6..702b37a2ca43 100644 --- a/pkgs/build-support/setup-hooks/install-fonts.sh +++ b/pkgs/build-support/setup-hooks/install-fonts.sh @@ -52,6 +52,9 @@ installFonts() { if [ -n "${webfont-}" ]; then installFont 'woff' "$webfont/share/fonts/woff" installFont 'woff2' "$webfont/share/fonts/woff2" + elif [[ "${dontInstallWebfonts-}" != 1 && -n "$(find . \( -iname "*.woff" -o -iname "*.woff2" \) -print)" ]]; then + nixErrorLog "Consider adding \"webfont\" to outputs to install woff/woff2 files." + nixErrorLog "Alternatively, set dontInstallWebfonts to silence this." + exit 1 fi - }