proper cabal use?

Daniel Gorín dgorin at dc.uba.ar
Mon Apr 28 10:50:48 EDT 2008


Hi

In the hint [1] package I need to run

ghc --print-libdir

at configure time and save its result. The catch is that I need to
run exactly the same ghc binary that will build the package (i.e. not
necessarily the one in the path).

Because of this requirement I can't use a "configure" script as
advised in the docs [2], can I?

What I did, instead, is to write a posthook that takes the
information in the LocalBuildInfo and runs the ghc configured there.
The downside is that this it is not portable across Cabal versions
(incidentally, if I add the requirement cabal-version: >= 1.2 && <
1.3, hackage refuses to upload the package...)

So my question is, what would be the proper way to handle this?

Thanks
Daniel

[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hint-0.2
[2] http://www.haskell.org/cabal/release/latest/doc/users-guide/ 
x30.html#system-dependent


More information about the Libraries mailing list