···194194 expected = "world";
195195 };
196196197197+ import-tree."test take as arg anything path convertible" = {
198198+ expr = lit.leafs [
199199+ {
200200+ outPath = ./tree/modules/hello-world;
201201+ }
202202+ ];
203203+ expected = [ ./tree/modules/hello-world/mod.nix ];
204204+ };
205205+197206 import-tree."test can take other import-trees as if they were paths" = {
198207 expr = (lit.filter (lib.hasInfix "mod")).leafs [
199208 (it.addPath ./tree/modules/hello-option)
+4
default.nix
···3333 x:
3434 if isImportTree x then
3535 treeFiles x
3636+ else if hasOutPath x then
3737+ listFilesRecursive x.outPath
3638 else if lib.pathIsDirectory x then
3739 lib.filesystem.listFilesRecursive x
3840 else
···6870 mapAttr =
6971 attrs: k: f:
7072 attrs // { ${k} = f attrs.${k}; };
7373+7474+ hasOutPath = and (x: x ? outPath) builtins.isAttrs;
71757276 isImportTree = and (x: x ? __config.__functor) builtins.isAttrs;
7377