depot/third_party/nixpkgs/lib/tests/modules/declare-submoduleWith-special.nix

21 lines
370 B
Nix

{ lib, ... }:
{
options.submodule = lib.mkOption {
type = lib.types.submoduleWith {
modules = [
(
{ lib, ... }:
{
options.foo = lib.mkOption {
default = lib.foo;
};
}
)
];
specialArgs.lib = lib // {
foo = "foo";
};
};
default = { };
};
}