From 9ee29045d017195a179fe10e2d2ca91e00ffa0ce Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 12 Sep 2024 19:48:52 +0200 Subject: [PATCH] improve engine function argument docs --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7ac8d12..db05b23 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,8 @@ then the engine function will be available under ```nix inputs.nte.engines.${system}.default ``` -it accepts 3 arguments: +it accepts 2 arguments: -- `pkgs` - nixpkgs - `src` - the directory containing all entries and templates - an attrset of: - `extraArgs` - an attrset of additional arguments passed to all entries and templates @@ -57,14 +56,14 @@ it accepts 3 arguments: and returns a string containing a shell script that applies the templates to the entries -the flake gives the engine `pkgs`, so when passing the engine function to a derivation, only provide it with the source directory: +when passing the engine function to the main derivation, only provide it with the source directory: ```nix import ./project/default.nix { # ... nte = nte.engines.${system}.default ./project; }; ``` -then you can use it as in the example derivation below: +then you can pass the attrset and use it in that derivation, as in the example below: ```nix { nte,