Include metadata and extra-filename

This PR is a stepping stone towards eventual use of `--extern`, which will allow multiple packages with the same name to exist in the transitive dependency graph.