Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Idris on OS X using Homebrew

7h1b edited this page Jul 31, 2013 · 13 revisions

Installing Idris on OS X should be straightforward, but requires a few manual steps to satisfy all dependencies. This document assumes that you have the Homebrew build system installed. It provides a package manager and simple installation system for packages and libraries that don't come standard with OS X.

Install Haskell Platform

If you don't already have Haskell installed, you will of course need the Haskell platform

Install GMP, libffi, Boehm GC and pkg-config

You can install Boehm GC, and the GMP and FFI library with the following command:

brew install pkg-config gmp libffi boehm-gc

This should pull in any required dependencies.

During the libffi installation, you may get a warning similar to the following:

This formula is keg-only: so it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Some formulae require a newer version of libffi.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/libffi/lib

This means that brew has compiled libffi, but has not linked to where your system can find it. In that case, the following command will make it available for the rest of the installation:

export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig

Install Idris

After this installing Idris is simple:

cabal install idris

By default the Idris binary is placed in $HOME/Library/Haskell/bin. To access it, you can add this to your PATH.

export PATH=$PATH:$HOME/Library/Haskell/bin

Clone this wiki locally