installing non-haskell binaries with cabal

Gwern Branwen gwern0 at gmail.com
Mon Jun 9 19:09:13 EDT 2008


On 2008.06.09 23:36:19 +0100, Duncan Coutts <duncan.coutts at worc.ox.ac.uk> scribbled 0.5K characters:
>
> On Mon, 2008-06-09 at 23:35 +0200, Misha Aizatulin wrote:
> > hello,
> >
> >    I would like to distribute a shell script as part of my haskell
> > project. How can I tell cabal to install the script as an executable?
>
> At the moment there is no easy way of doing that. It can be installed as
> a data file pretty easily but not into the $bindir.
>
> You'd have to write a custom Setup.hs script and change the postInst
> hook. Use LocalBuildInfo.absoluteInstallDirs to get the bindir.
>
> Duncan

And of course, at that point, you'd be better off just writing the script in Haskell.

(Seriously, I had to do that for the Roguestar packages. It was hardly any trouble at all - Haskell is a better scripting language than I think people give it credit for.)

--
gwern
SADRS CTP Dateline Mac-10 Alex Sears Ceridian botux Artful industrial
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/libraries/attachments/20080609/27745490/attachment.bin


More information about the Libraries mailing list