[Haskell-cafe] Install a script with Cabal?
creswick at gmail.com
Wed Mar 21 20:16:40 CET 2012
On Tue, Mar 20, 2012 at 1:45 AM, Ketil Malde <ketil at malde.org> wrote:
> I have a small project that installs a couple of Haskell tools and a
> script that uses these. Cabal will of course build and install the
> Haskell programs, but how can I get Cabal to install the script as
> well? There's a host of UserHooks available¹, but it'd probably be
> better to have an example than to try to experiment with the right
I don't have an example handy, but I think you'll want preInts,
instHook, or postInst. I'd probably go with postInst unless you need
data provided by instHook's type that isn't passed to preInst or
LocalBuildInfo /probably/ has the details you need (eg: installDirTemplates).
Don't forget to invoke the default hook as part of your
re-implementation -- if you override instHook, for example, you need
to invoke the instHook that *would have* happened, or no installation
will take place.
> ¹ http://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Distribution-Simple.html#t%3AUserHooks
> If I haven't seen further, it is by standing in the footprints of giants
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe