
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

On Mon, 2008-04-28 at 11:50 -0300, Daniel Gorín wrote:
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...)
Ah, that's not good. We'll have to look into that.
So my question is, what would be the proper way to handle this?
Using the custom Setup.hs seems unavoidable. Duncan

On Apr 28, 2008, at 8:24 PM, Duncan Coutts wrote:
(incidentally, if I add the requirement cabal-version: >= 1.2 && < 1.3, hackage refuses to upload the package...)
Ah, that's not good. We'll have to look into that.
Ok, I thought this was an indication that I was doing something wrong!
So my question is, what would be the proper way to handle this?
Using the custom Setup.hs seems unavoidable.
Fine with me, then Thanks Daniel
participants (2)
-
Daniel Gorín
-
Duncan Coutts