File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 3333 # Merge together the outputs for all systems.
3434 op = attrs : system :
3535 let
36- ret =
37- let
38- retOrFunc = f system ;
39- in
40- if builtins . isFunction retOrFunc
41- then retOrFunc ret
42- else retOrFunc ;
36+ ret = maybeFix ( f system ) ;
4337 op = attrs : key : attrs //
4438 {
4539 ${ key } = ( attrs . ${ key } or { } )
5650 eachDefaultSystemMap = eachSystemMap defaultSystems ;
5751
5852 # Builds a map from <attr>=value to <system>.<attr> = value.
59- eachSystemMap = systems : f : builtins . listToAttrs ( builtins . map ( system : { name = system ; value = f system ; } ) systems ) ;
53+ eachSystemMap = systems : f :
54+ builtins . listToAttrs ( builtins . map ( system : { name = system ; value = maybeFix ( f system ) ; } ) systems ) ;
6055
6156 # Nix flakes insists on having a flat attribute set of derivations in
6257 # various places like the `packages` and `checks` attributes.
207202 system
208203 ;
209204 } ;
205+
206+ maybeFix = arg :
207+ let
208+ fix = f : let x = f x ; in x ;
209+ in
210+ if builtins . isFunction arg then fix arg else arg ;
210211in
211212lib
You can’t perform that action at this time.
0 commit comments