···1616let
1717 mergeInputs = name:
1818 (attrs.${name} or [ ]) ++
1919+ # 1. get all `{build,nativeBuild,...}Inputs` from the elements of `inputsFrom`
2020+ # 2. since that is a list of lists, `flatten` that into a regular list
2121+ # 3. filter out of the result everything that's in `inputsFrom` itself
2222+ # this leaves actual dependencies of the derivations in `inputsFrom`, but never the derivations themselves
1923 (lib.subtractLists inputsFrom (lib.flatten (lib.catAttrs name inputsFrom)));
20242125 rest = builtins.removeAttrs attrs [