mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
feat(submodules): add support for submodule exports
This commit is contained in:
parent
accd2dec1b
commit
9ca9c44c92
4 changed files with 52 additions and 2 deletions
32
tests/submodules/exports.nix
Normal file
32
tests/submodules/exports.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ name, config, lib, kubenix, subm-lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
submodule = {
|
||||
imports = [ kubenix.modules.submodule ];
|
||||
|
||||
config.submodule = {
|
||||
name = "subm";
|
||||
exports = {
|
||||
inherit id;
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
imports = with kubenix.modules; [ test submodules ];
|
||||
|
||||
test = {
|
||||
name = "submodules-exports";
|
||||
description = "Submodules exports test";
|
||||
assertions = [{
|
||||
message = "should have library exported";
|
||||
assertion = subm-lib.id 1 == 1;
|
||||
}];
|
||||
};
|
||||
|
||||
submodules.imports = [{
|
||||
modules = [submodule];
|
||||
exportAs = "subm-lib";
|
||||
}];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue