
On Wed, Dec 8, 2010 at 11:12 AM, Duncan Coutts
On 8 December 2010 17:02, Sönke Hahn
wrote: Hi!
If you write a cabal setup script with user hooks, is there a way to tell cabal-install that the setup script itself depends on some package from hackage? (The dependency would be cabal-macosx in my case.)
No, the Cabal spec has no support for that. It is assumed that Setup.hs scripts have minimal dependencies, since the original idea was that these would be the first user interface, so they must compile.
My plan is to move away from Setup.hs being the primary user interface and that would in principle make it possible for Setup.hs scripts to have other dependencies, however we will need to extend the Cabal specification and .cabal format to enable it.
As long as we're wishing, it would be nice if I could write tools which rely on a particular package's userHooks without having to have my utility be a part of the Cabal library. I'm not sure what that would look like - it would almost require packages conforming to the "simple" install mechanism would expose a library that custom tools (and Setup.hs?) could load, which sounds fraught with peril. Antoine