needing to know install paths

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Thu Jul 6 07:12:22 EDT 2006


On Thu, 2006-07-06 at 10:43 +0100, Duncan Coutts wrote:
> Hi Cabal hackers,
> 
> For c2hs we've run into a problem. See the thread about c2hs on window
> over on the haskell list.
> 
> c2hs wants to install a data file (actually a .hs source file) and wants
> to know where it's been installed so that c2hs --copy-library can find
> and copy said file.
> 
> So how do we do this? At the moment c2hs's Setup.hs calls a postInst
> script which installs a wrapper script (much like all the little ghc
> wrapper scripts which specifies the path where things can be found). Of
> course this doesn't work on Windows.
> 
> I recall some talk about making this sort of thing easier? Where did we
> get with that?

Ah, I think I can answer my own question.

There is a "data-files" field one can add to the cabal file and the
recent Paths_${projname}.hs thing allows us to find the data files at
runtime.

So I'll go try to hack that into c2hs so it'll work on win32.

Duncan



More information about the cabal-devel mailing list