Added RPM generation capability to Cabal
simonmarhaskell at gmail.com
Wed Feb 21 08:13:51 EST 2007
Isaac Jones wrote:
> Have you seen cabal2rpm? It's an external tool with a similar goal:
> Similarly, there's dh_haskell for Debian packages:
> Can you outline any other differences between this command and
> 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.
More information about the cabal-devel