proper cabal use?

Daniel Gorín dgorin at
Mon Apr 28 10:50:48 EDT 2008


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?



More information about the Libraries mailing list