Recursive import from a cabal file on standard input doesn’t work, since imports of dependencies are attempted from standard input. This typically fails due to EOF.
The sensible behaviour would probably be to only read the initial package from standard input, and then fall back to hackage. Alternatively, the options could be made to conflict.