clan.lib.clan { <your definition> } returns an eval result
In contrast to buildClan which returns the .config
This allows for better introspection
35 lines
726 B
Nix
35 lines
726 B
Nix
## WARNING: Do not add core logic here.
|
|
## This is only a wrapper such that 'clan' can be called as a function.
|
|
{
|
|
lib,
|
|
clanLib,
|
|
clan-core,
|
|
nixpkgs,
|
|
nix-darwin,
|
|
}:
|
|
rec {
|
|
buildClan =
|
|
module: lib.warn "'buildClan' is deprecated. Use 'clan-core.lib.clan' instead" (clan module).config;
|
|
|
|
clan =
|
|
{
|
|
self ? lib.warn "Argument: 'self' must be set when using 'buildClan'." null, # Reference to the current flake
|
|
...
|
|
}@m:
|
|
lib.evalModules {
|
|
specialArgs = {
|
|
inherit (clan-core) clanLib;
|
|
inherit
|
|
self
|
|
clan-core
|
|
nixpkgs
|
|
nix-darwin
|
|
;
|
|
};
|
|
modules = [
|
|
m
|
|
clan-core.modules.clan.default
|
|
];
|
|
};
|
|
}
|