From 90856f19bfa9b25127938c20e92f19d304f50e29 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Fri, 13 Sep 2024 11:02:03 +0200 Subject: [PATCH] swap applyTemplate arguments --- engine.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine.nix b/engine.nix index bc2dcb4..8dfaafc 100644 --- a/engine.nix +++ b/engine.nix @@ -29,7 +29,7 @@ pkgs: src: {extraArgs, entries, templates}: let else _template; - applyTemplate = entry: templateFile: let + applyTemplate = templateFile: entry: let templateFn = import templateFile; template = templateFn (args // entry); in @@ -41,7 +41,7 @@ pkgs: src: {extraArgs, entries, templates}: let newEntry = template.output // {inherit (entry) file;}; foundTemplateFile = findTemplateFile newEntry; in - applyTemplate newEntry foundTemplateFile; + applyTemplate foundTemplateFile newEntry; replaceSuffix = from: to: string: if !(hasSuffix from string) then @@ -79,10 +79,10 @@ pkgs: src: {extraArgs, entries, templates}: let entry; processEntryFile = entryFile: let - entry = getEntry entryFile; foundTemplateFile = findTemplateFile entry; + entry = getEntry entryFile; in - applyTemplate entry foundTemplateFile; + applyTemplate foundTemplateFile entry; in /*sh*/'' ${concatMapStrings