Cabal question, adding data files

Hi, I have a cabal executable, which requires additional data files. How do I do this in Cabal? I have seen extra-source-files, but they are not added at install time to the destination directory, which doesn't help me. I noticed that Alex does this, but with a lot of Cabal calling in Setup.hs with hooks etc, which is not really ideal. Is there any easy way to do the "install these files along with the program, please" ? If anyone needs any concrete examples, take for example HsColour, which needs the files .hscolour and hscolour.css, but currently install doesn't put either of them anywhere useful. Thanks Neil

On Wed, Aug 23, 2006 at 10:42:54PM +0100, Neil Mitchell wrote:
I have a cabal executable, which requires additional data files. How do I do this in Cabal? I have seen extra-source-files, but they are not added at install time to the destination directory, which doesn't help me.
The field you want is data-files, documented in section 2.1.1 of the Cabal User's Guide.

On Wed, Aug 23, 2006 at 11:36:00PM +0100, Neil Mitchell wrote:
Hi
The field you want is data-files, documented in section 2.1.1 of the Cabal User's Guide.
That looks perfect. Is there any reason that Alex doesn't use this? I was trying to learn by example.
Perhaps because Alex predates the data-files field; data-files was only introduced in Cabal 1.1.4. Hence you might want to also put the following at the top of your .cabal file: Cabal-Version: >= 1.1.4 cheers, Conrad.
participants (3)
-
Conrad Parker
-
Neil Mitchell
-
Ross Paterson