File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 194194 expected = "world" ;
195195 } ;
196196
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+
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 )
Original file line number Diff line number Diff line change 3333 x :
3434 if isImportTree x then
3535 treeFiles x
36+ else if hasOutPath x then
37+ listFilesRecursive x . outPath
3638 else if lib . pathIsDirectory x then
3739 lib . filesystem . listFilesRecursive x
3840 else
6971 attrs : k : f :
7072 attrs // { ${ k } = f attrs . ${ k } ; } ;
7173
74+ hasOutPath = and ( x : x ? outPath ) builtins . isAttrs ;
75+
7276 isImportTree = and ( x : x ? __config . __functor ) builtins . isAttrs ;
7377
7478 inModuleEval = and ( x : x ? options ) builtins . isAttrs ;
You can’t perform that action at this time.
0 commit comments