From 66a5dcf5d42913f9ae48fefa02ebd51dc1ecde64 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 12 Sep 2024 20:19:59 +0200 Subject: [PATCH] rename engines to functions --- README.md | 4 ++-- flake.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b89d5bc..8bfd7c9 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/flake.nix b/flake.nix index c5b2a69..bbf98fe 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; } );