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:
@@ -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"
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user