Developing in clojure is an absolute pleasure, however setting it up is rarely as easy. In this guide I will take you through the steps to get OS X up and running with Clojure and Leiningen (the Clojure build system).
Macports is a great package manager for OS X, it has all you need to get up and running. Install Macports from here http://www.macports.org/install.php
To install clojure you need to run this as root:
sudo port -R install clojure
When you run that you will be asked for your password, after that it will automatically install. The -R will upgrade any dependencies too, just to keep things tidy.
Leiningen is the build tool for clojure, like maven is for java. In fact it even plays nicely with maven! Install it as such:
sudo port -R install leiningen
Once its installed it comes with a 2nd step you need to run:
Test your work
After which you are done. We’re going to test this by creating a new project using leiningen and proving the template tests fail as they are designed to do.
lein new testing
If you see the line:
FAIL in (replace-me) (core.clj:6)
Then you have a working setup, welcome to the world of clojure!