File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 125125 # Merge together the outputs for all systems.
126126 op = attrs : system :
127127 let
128- ret =
129- let
130- retOrFunc = f system ;
131- in
132- if builtins . isFunction retOrFunc
133- then retOrFunc ret
134- else retOrFunc ;
128+ ret = maybeFix ( f system ) ;
135129
136130 op = attrs : key :
137131 let
155149 eachDefaultSystemMap = eachSystemMap defaultSystems ;
156150
157151 # Builds a map from <attr>=value to <system>.<attr> = value.
158- eachSystemMap = systems : f : builtins . listToAttrs ( builtins . map ( system : { name = system ; value = f system ; } ) systems ) ;
152+ eachSystemMap = systems : f :
153+ builtins . listToAttrs ( builtins . map ( system : { name = system ; value = maybeFix ( f system ) ; } ) systems ) ;
159154
160155 # Nix flakes insists on having a flat attribute set of derivations in
161156 # various places like the `packages` and `checks` attributes.
232227 system
233228 ;
234229 } ;
230+
231+ maybeFix = arg :
232+ let
233+ fix = f : let x = f x ; in x ;
234+ in
235+ if builtins . isFunction arg then fix arg else arg ;
235236in
236237lib
You can’t perform that action at this time.
0 commit comments