···16let
17 mergeInputs = name:
18 (attrs.${name} or [ ]) ++
19+ # 1. get all `{build,nativeBuild,...}Inputs` from the elements of `inputsFrom`
20+ # 2. since that is a list of lists, `flatten` that into a regular list
21+ # 3. filter out of the result everything that's in `inputsFrom` itself
22+ # this leaves actual dependencies of the derivations in `inputsFrom`, but never the derivations themselves
23 (lib.subtractLists inputsFrom (lib.flatten (lib.catAttrs name inputsFrom)));
2425 rest = builtins.removeAttrs attrs [