Isaac Jones wrote:
Have you seen cabal2rpm?  It's an external tool with a similar goal:

http://community.moertel.com/ss/space/Cabal2rpm/cabal2rpm.html

Similarly, there's dh_haskell for Debian packages:
http://man.cx/dh_haskell(1)

Can you outline any other differences between this command and
cabal2rpm?

This seems like really cool work, but what do folks think about adding
OS-specific items like this to Cabal.  My stance has been that we
should keep such tools external to Cabal, layered on top of Cabal so
as to not clutter Cabal too much, and to make Cabal's interface to the
outside world as good as possible.

The problem with layered tools is that they don't work well with the Setup.lhs scheme that we currently have. Setup.lhs can modify PackageDescription via hooks, so the layered tool won't see these modifications. I suspect that in practice there are hardly any clashes of this kind, though. To properly support this we would have to provide a way to output the modified PackageDescription so the tool can read it in.

On the other hand, every time we add a new command (like 'Setup rpm') we need a new hook, which breaks the Cabal API again: existing packages which use hooks probably wanted to also hook the new command. The current design for hooks doesn't extend well, we should think about that.

FWIW, I'd let the RPM patch in for now.

Cheers,
        Simon

_______________________________________________
cabal-devel mailing list
cabal-devel@haskell.org
http://www.haskell.org/mailman/listinfo/cabal-devel

Reply via email to