Skip to content
masida edited this page Sep 21, 2015 · 20 revisions

Note: You can also choose build in a Cabal Sandbox as mentioned here.

Idris on Debian Jessie

I will describe the installation of Idris in a Haskell sandbox, relying in great part on Debian packages.

Having installed a basic Hakell environment, and in particular Cabal from Debian (your mileage may vary, of course):

# apt-get install haskell-platform cabal-install libgmp-dev

Further packages I install either from Debian or from within my isolated Haskell environment. Anyway, a few more Debian packages are needed:

# apt-get install llvm-3.3-dev libghc-terminfo-dev pkg-config libgc-dev build-essential libghc-llvm-dev

Update the cabal package list:

$ cabal update

A sandbox is created easily:

$ cabal unpack idris 
$ cd idris-0.9.19
$ cabal sandbox init

This should be enough to install Idris:

$ cabal update
$ cabal install --dependencies-only
$ cabal install -f FFI -f LLVM -f GMP

If this command completed succesfully, you should be able to run Idris using:

$ ./.cabal-sandbox/bin/idris

You can also specify an alternative directory for the binary (a directory that you already added to your $PATH for example), like this:

$ cabal install --bindir=/home/mp/.local/bin/ -f FFI -f LLVM -f GMP

If everything goes well, you should be able to just call idris:

$ idris

Idris on Debian Wheezy

This excellent guide entails how to get a recent version of Haskell on Debian Wheezy: http://www.extellisys.com/articles/haskell-on-debian-wheezy

This is necessary for building the most recent version of Idris without pulling ones hair out. Once this has been done, there is one more dependency needed to link Idris, this can be installed via the following command

sudo apt-get install libtinfo-dev

You may also need to edit your .bashrc to reflect the location of our new shiny binaries. We can do this by adding the following to our file:

export PATH=$PATH:/usr/local/opt/ghc-7.8.3-x86_64-min/bin

Now, after restarting bash or reloading the profile, you should see this upon running these commands:

$  cabal --version
cabal-install version 1.20.0.3
using version 1.20.0.0 of the Cabal library 
$  ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3

Next, we simply install Idris via cabal

cabal update
cabal install idris

Not so soon after, and we're done :).

Clone this wiki locally