How do I depend on multiple packages from a monorepo with spago?

Note: The original problem formulation was terrible, please see this github issue instead:

I have a monorepo with two libraries, A and B, where B depends on A. I have an application in a separate repo where packages.dhall declares dependencies on both A and B. I am getting an error

> Module M has been defined multiple times

for every module defined in A. How do I fix this?

I can post more info