rename engines to functions

This commit is contained in:
jacekpoz 2024-09-12 20:19:59 +02:00
parent 0c9f0c43b2
commit 66a5dcf5d4
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
2 changed files with 5 additions and 5 deletions

View file

@ -44,7 +44,7 @@ nte = {
then the engine function will be available under then the engine function will be available under
```nix ```nix
inputs.nte.engines.${system}.default inputs.nte.functions.${system}.engine
``` ```
it accepts 2 arguments: it accepts 2 arguments:
@ -60,7 +60,7 @@ when passing the engine function to the main derivation, only provide it with th
```nix ```nix
import ./project/default.nix { import ./project/default.nix {
# ... # ...
nte = nte.engines.${system}.default ./project; nte = inputs.nte.functions.${system}.engine ./project;
}; };
``` ```
then you can pass the attrset and use it in that derivation, as in the example below: then you can pass the attrset and use it in that derivation, as in the example below:

View file

@ -10,11 +10,11 @@
forEachSystem = nixpkgs.lib.genAttrs systems; forEachSystem = nixpkgs.lib.genAttrs systems;
pkgsForEach = nixpkgs.legacyPackages; pkgsForEach = nixpkgs.legacyPackages;
in rec { in rec {
engines = forEachSystem ( functions = forEachSystem (
system: let system: let
pkgs = pkgsForEach.${system}; pkgs = pkgsForEach.${system};
in { in {
default = import ./engine.nix pkgs; engine = import ./engine.nix pkgs;
} }
); );
@ -32,7 +32,7 @@
in { in {
default = import ./example/default.nix { default = import ./example/default.nix {
inherit (pkgs) lib stdenv; inherit (pkgs) lib stdenv;
nte = engines.${system}.default ./example; nte = functions.${system}.engine ./example;
}; };
} }
); );