rename engines to functions
This commit is contained in:
parent
0c9f0c43b2
commit
66a5dcf5d4
2 changed files with 5 additions and 5 deletions
|
@ -44,7 +44,7 @@ nte = {
|
|||
|
||||
then the engine function will be available under
|
||||
```nix
|
||||
inputs.nte.engines.${system}.default
|
||||
inputs.nte.functions.${system}.engine
|
||||
```
|
||||
it accepts 2 arguments:
|
||||
|
||||
|
@ -60,7 +60,7 @@ when passing the engine function to the main derivation, only provide it with th
|
|||
```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:
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
forEachSystem = nixpkgs.lib.genAttrs systems;
|
||||
pkgsForEach = nixpkgs.legacyPackages;
|
||||
in rec {
|
||||
engines = forEachSystem (
|
||||
functions = forEachSystem (
|
||||
system: let
|
||||
pkgs = pkgsForEach.${system};
|
||||
in {
|
||||
default = import ./engine.nix pkgs;
|
||||
engine = import ./engine.nix pkgs;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
in {
|
||||
default = import ./example/default.nix {
|
||||
inherit (pkgs) lib stdenv;
|
||||
nte = engines.${system}.default ./example;
|
||||
nte = functions.${system}.engine ./example;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue