[Haskell-cafe] Self-contained GHC for Mac

Bob Ippolito bob at redivi.com
Fri May 23 18:42:13 UTC 2014

After seeing some demand for packaged Haskell for Mac for the IHaskell
project and by word of mouth at BayHac I decided to take a stab at it. Here
you go:
http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install


It can be a bit cumbersome to use the GHC builds from haskell.org on Mac,
because they don't come "fully baked", you have to ./configure
--prefix=/some/path to get them installed and the installation is not
relocatable, if you move it the scripts will break and the package.conf.d
files will go stale. It also doesn't ship with cabal-install, which is
cumbersome as well, especially for new users.

How does it work?

In https://github.com/ghcformacosx/ghc-dot-app I have a Main.hs script
which downloads/builds/etc. all of the prerequisites. Then it patches the
shell scripts to use a path relative to themselves (after following
symlinks) rather than hard-coding an installation location. It also patches
the package.conf.d files to use ${pkgroot} relative paths.

Separately, there's an Xcode project that includes all of the metadata to
make it look like a real Mac app bundle (icons, Info.plist) and a small
Cocoa application that has a button to open the docs and provides
instructions for adding it to the PATH in .bashrc. Due to the heuristics in
Mac OS X's man, this will automatically make man pages work as well. Using
Xcode here also makes it produce a signed build (which I do, since I am
already paying for the $99/year license).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140523/b9dd8cec/attachment.html>

More information about the Haskell-Cafe mailing list