lib.clan: properly merge self attrs
This commit is contained in:
@@ -4,9 +4,10 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
testFlake = (clanLib.clan {
|
testFlake =
|
||||||
self = { };
|
(clanLib.clan {
|
||||||
directory = ./vm;
|
self = { };
|
||||||
|
directory = ./vm;
|
||||||
|
|
||||||
machines.jon = {
|
machines.jon = {
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
|||||||
@@ -26,7 +26,17 @@ in
|
|||||||
This is used to import external clan modules.
|
This is used to import external clan modules.
|
||||||
'';
|
'';
|
||||||
# Workaround for lib.clan
|
# Workaround for lib.clan
|
||||||
apply = v: if lib.isAttrs v then v // { inputs.self.clan = config; } else v;
|
apply =
|
||||||
|
s:
|
||||||
|
if lib.isAttrs s then
|
||||||
|
s
|
||||||
|
// {
|
||||||
|
inputs = (s.inputs or { }) // {
|
||||||
|
self.clan = config;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
s;
|
||||||
};
|
};
|
||||||
|
|
||||||
directory = lib.mkOption {
|
directory = lib.mkOption {
|
||||||
|
|||||||
Reference in New Issue
Block a user