feat(lib): init callLib; helper to bootstrap clanLib
This commit is contained in:
@@ -13,6 +13,8 @@ lib.fix (clanLib: {
|
||||
# We should reduce the dependency on 'self' aka the 'flake' object
|
||||
# This makes it easier to test
|
||||
# most of the time passing the whole flake is unnecessary
|
||||
callLib = file: args: import file { inherit lib clanLib; } // args;
|
||||
|
||||
evalClan = import ./eval-clan-modules {
|
||||
inherit lib;
|
||||
clan-core = self;
|
||||
|
||||
@@ -10,7 +10,9 @@ let
|
||||
pathExists
|
||||
;
|
||||
in
|
||||
{
|
||||
rec {
|
||||
# We should remove this.
|
||||
# It would enforce treating at least 'lib' as a module in a whole
|
||||
imports = filter pathExists [
|
||||
./jsonschema/flake-module.nix
|
||||
./inventory/flake-module.nix
|
||||
@@ -18,9 +20,10 @@ in
|
||||
./values/flake-module.nix
|
||||
./distributed-service/flake-module.nix
|
||||
];
|
||||
flake.lib = import ./default.nix {
|
||||
inherit lib inputs;
|
||||
flake.clanLib = import ./default.nix {
|
||||
inherit lib inputs self;
|
||||
inherit (inputs) nixpkgs;
|
||||
clan-core = self;
|
||||
};
|
||||
# TODO: remove this legacy alias
|
||||
flake.lib = flake.clanLib;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user