-
Notifications
You must be signed in to change notification settings - Fork 3
Idris on Debian
Note: You can also choose build in a Cabal Sandbox as mentioned here.
Update: 2016-10-03.
For at least Debian Jessie 3.16.36-1+deb8u1 (my installation) the instructions below this update may not work. In particular you may be able to install with just:
sudo apt install haskell-platform
sudo apt install libncurses5-dev
mkdir Idris
cd Idris
cabal update
cabal sandbox init
cabal install idris
You may need a few packages I already had for my install (as are probably mentioned in the instructions below this update).
libncurses5-dev is where the instructions below this update may fail you - if you are having problems with cabal telling you your installation will break, or when you --force-installs anyway and terminfo fails to install because it is missing curses.h, installing libncurses5-dev should fix this for you.
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 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/.local/bin/ -f FFI -f LLVM -f GMP
Note Idris will then install all packages into the sandbox. So removing the unpacked Idris directory will also delete all the libraries you have installed.
If everything goes well, you should be able to just call idris
:
$ idris
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 :).
Binary Packages
Tool Support
Community
- Libraries, available elsewhere
- Idris Developer Meetings
- The Zen of Idris
Development