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 - }