build-support/fetchzip: remove warnIf usage

warnIf sends our warning message through a function call, even if the
warning condition doesn't trigger. This requires a lot of thunk
allocation that can be easily avoided.
This commit is contained in:
Eman Resu
2026-05-28 00:15:36 -04:00
parent 3ec1e90b10
commit 020ce4ae44
+5 -3
View File
@@ -106,9 +106,11 @@ lib.extendMkDerivation {
)
+ ''
${postFetch}
${lib.warnIf (extraPostFetch != "")
"use 'postFetch' instead of 'extraPostFetch' with 'fetchzip' and 'fetchFromGitHub' or 'fetchFromGitLab'."
extraPostFetch
${
if extraPostFetch != "" then
lib.warn "use 'postFetch' instead of 'extraPostFetch' with 'fetchzip' and 'fetchFromGitHub' or 'fetchFromGitLab'." extraPostFetch
else
extraPostFetch
}
chmod 755 "$out"
'';