Import all nix files in a directory tree. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ dendrix.oeiuwq.com/Dendritic.html
dendritic inputs

Use toString on attrs having outPath

+13
+9
checkmate.nix
··· 194 194 expected = "world"; 195 195 }; 196 196 197 + import-tree."test take as arg anything path convertible" = { 198 + expr = lit.leafs [ 199 + { 200 + outPath = ./tree/modules/hello-world; 201 + } 202 + ]; 203 + expected = [ ./tree/modules/hello-world/mod.nix ]; 204 + }; 205 + 197 206 import-tree."test can take other import-trees as if they were paths" = { 198 207 expr = (lit.filter (lib.hasInfix "mod")).leafs [ 199 208 (it.addPath ./tree/modules/hello-option)
+4
default.nix
··· 33 33 x: 34 34 if isImportTree x then 35 35 treeFiles x 36 + else if hasOutPath x then 37 + listFilesRecursive x.outPath 36 38 else if lib.pathIsDirectory x then 37 39 lib.filesystem.listFilesRecursive x 38 40 else ··· 68 70 mapAttr = 69 71 attrs: k: f: 70 72 attrs // { ${k} = f attrs.${k}; }; 73 + 74 + hasOutPath = and (x: x ? outPath) builtins.isAttrs; 71 75 72 76 isImportTree = and (x: x ? __config.__functor) builtins.isAttrs; 73 77