finding the dependecies of cabal packages
Brian Smith
brianlsmith at gmail.com
Wed Jul 27 17:10:26 EDT 2005
On 7/27/05, Duncan Coutts <duncan.coutts at worcester.oxford.ac.uk> wrote:
> In particular the ebuild must list all the dependencies of the package.
> Required Haskell libraries are listed in the "build-depends:" field in
> the cabal file, so that one is easy. However it is not clear how to find
> out the build tools that the cabal package requires.
First of all, you would have to parse the Setup.lhs/Setup.hs file to
determine which build infrastructure is being used, whether any hooks
are being used, etc. Assuming that the build infrastructure is
"Simple" and there are no hooks being used, then you have choices:
(1) You could build a compiled version using GHC and the tools that
come with it, (2) You can build an interpreted version using Hugs and
the tools that come with it.
However, I think there are going to be a lot of cases where the
application can only be built with GHC. You would have to parse each
file for {-# OPTIONS #-} and {-# OPTIONS_GHC #-}
In short, the cabal package description is not the only information
you need to fully describe how to successfully build an application.
- Brian
More information about the Libraries
mailing list