modules/clan: inject .clan into self.inputs if self is an attribute set

This commit is contained in:
Johannes Kirschbauer
2025-07-01 10:46:00 +02:00
parent afd1ba6306
commit 42d1cd2a83

View File

@@ -2,6 +2,7 @@
lib, lib,
clanLib, clanLib,
self, self,
config,
# TODO: Use dependency injection to allow for testing # TODO: Use dependency injection to allow for testing
# inventoryInterface, # inventoryInterface,
... ...
@@ -24,6 +25,8 @@ in
description = '' description = ''
This is used to import external clan modules. This is used to import external clan modules.
''; '';
# Workaround for lib.clan
apply = v: if lib.isAttrs v then v // { inputs.self.clan = config; } else v;
}; };
directory = lib.mkOption { directory = lib.mkOption {