{lib}: path: attrs: let fragment = import path; in with builtins; if isAttrs fragment then fragment else fragment ((intersectAttrs (functionArgs fragment) lib) // attrs)