(Imported from Trac #637, reported by guest on 2010-02-19)
I'm trying to keep the source of multiple packages in a single source repository. Unfortunately, I cannot maintain a .cabal file per package, because some commands invoke function defaultPackageDesc unconditionally.
I tried using defaultMainNoRead instead of defaultMain
and passing the desired package name through the environment. This solution doesn't work at all in 126.96.36.199. It works only partially in HEAD: Setup configure and Setup build work but Setup sdist does not because it ignores the readDesc field and invokes defaultPackageDesc unconditionally.
Would it be possible to add a field to UserHooks which would specify the .cabal filename to use? Then defaultPackageDesc should be always called through this field, never directly, and could thus be consistently overridden.
Chiming in here to add my support for this request. I recently got bit by the fact that sdist ignores readDesc, which is unfortunate, as it seems like the cleanest approach to programmatically populating fields like extra-source-files.