rename all arg params to extraArgs
This commit is contained in:
parent
8732182f9a
commit
8126ff8ec8
1 changed files with 6 additions and 6 deletions
12
stdlib.nix
12
stdlib.nix
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue