rename all arg params to extraArgs

This commit is contained in:
jacekpoz 2024-09-13 14:52:19 +02:00
parent 8732182f9a
commit 8126ff8ec8
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -24,8 +24,8 @@ pkgs: let
else
(import template);
applyTemplate = args: templateFn: entry: let
template = templateFn ({inherit pkgs;} // args // entry);
applyTemplate = extraArgs: templateFn: entry: let
template = templateFn ({inherit pkgs;} // extraArgs // entry);
in
if isBaseTemplate template then {
inherit (entry) file;
@ -43,12 +43,12 @@ pkgs: let
else
concatStrings [ (removeSuffix from string) to ];
getTemplateFormat = args: entry: templateFn: let
getTemplateFormat = extraArgs: entry: templateFn: let
# getEntry needs to go down to the base template for the format
# but any template through the way can ask for a file
# so we just give it a placeholder - an empty string here
# since the output of this thing doesn't matter
template = templateFn ({inherit pkgs;} // args // entry // { file = ""; });
template = templateFn ({inherit pkgs;} // extraArgs // entry // { file = ""; });
in
if isBaseTemplate template then
template.format
@ -58,9 +58,9 @@ pkgs: let
in
getTemplateFormat newEntry foundTemplateFn;
getEntry = args: sourceDir: entryFile: let
getEntry = extraArgs: sourceDir: entryFile: let
sourceFile = toString (removePrefix sourceDir entryFile);
entry = (import entryFile) ({inherit pkgs;} // args);
entry = (import entryFile) ({inherit pkgs;} // extraArgs);
foundTemplateFn = findTemplateFn entry;
entryFormat = getTemplateFormat entry foundTemplateFn;
in