File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 pkgsFor = system : import sources . nixpkgs { inherit system ; } ;
3030
3131 flattenTests =
32- lib : prefix : tests :
33- builtins . foldl' lib . recursiveUpdate { } (
34- lib . mapAttrsToList (
35- name : value :
36- let
37- key = if prefix == "" then name else "${ prefix } -${ name } " ;
38- in
39- if lib . isDerivation value then
40- { ${ key } = value ; }
41- else if builtins . isAttrs value then
42- flattenTests lib key value
43- else
44- { }
45- ) tests
46- ) ;
32+ lib : tests :
33+ let
34+ go =
35+ prefix : attrs :
36+ builtins . foldl' lib . recursiveUpdate { } (
37+ lib . mapAttrsToList (
38+ name : value :
39+ let
40+ key = if prefix == "" then name else "${ prefix } -${ name } " ;
41+ in
42+ if lib . isDerivation value then
43+ { ${ key } = value ; }
44+ else if builtins . isAttrs value then
45+ go key value
46+ else
47+ { }
48+ ) attrs
49+ ) ;
50+ in
51+ go "" tests ;
4752 in
4853 {
4954 formatter = forSystems systems ( system : ( pkgsFor system ) . nixfmt-tree ) ;
5358 let
5459 pkgs = pkgsFor system ;
5560 in
56- flattenTests pkgs . lib "" ( import ./tests { inherit pkgs ; } )
61+ flattenTests pkgs . lib ( import ./tests { inherit pkgs ; } )
5762 ) ;
5863
5964 finixModules = import ./modules ;
You can’t perform that action at this time.
0 commit comments