16 January 2021

Deps and CLI1 is really simple and clean way to run clojure. But there is no official installation guide for Windows users. But theoretically, it should work on any platform, as the underneath is JVM!

The official clojure site provides Linux installation method: https://clojure.org/guides/getting_started#_installation_on_linux

And you can simulate Linux environment with Cygwin.

Firstly, download setup-x86_64.exe 2 and install cygwin on your Windows box.

Then, Open mintty.exe follow the guideline on https://clojure.org/guides/getting_started#_installation_on_linux

curl -O https://download.clojure.org/install/linux-install-
chmod +x linux-install-
sudo ./linux-install-

Finally, fix the path issue in two place:

# Set dir containing the installed files
- install_dir=/usr/local/lib/clojure
+ install_dir=C:/cygwin64/usr/local/lib/clojure

# Determine user config directory
if [[ -n "$CLJ_CONFIG" ]]; then
elif [[ -n "$XDG_CONFIG_HOME" ]]; then
-  config_dir="$HOME/.clojure"
+  config_dir="C:/Users/kimim/.clojure" # Where your .clojure located

Now, you can use clojure -M:run to run clojure deps.edn project in mintty.exe.