Skip to content

Instantly share code, notes, and snippets.

@hktonylee
Last active October 22, 2021 07:02
Show Gist options
  • Save hktonylee/bb7443b3b0d80a06eb8223641c9f60c8 to your computer and use it in GitHub Desktop.
Save hktonylee/bb7443b3b0d80a06eb8223641c9f60c8 to your computer and use it in GitHub Desktop.
Install Unison v2.40 in macOS 11+
# Get Unison v2.40.x
git clone https://github.com/bcpierce00/unison.git
cd unison
git checkout 2.40
# Install opam (OCaml verion manager
brew install opam
# Download OCaml v4.06.1
opam init
opam switch create 4.06.1
# Patch files
# 1. In `src/mkProjectInfo.ml`: change `revisionString` from `"$Rev$"` to `"$Rev: 600$"`
# 2. In `src/Makefile`: Change `INSTALLDIR = /usr/local/bin/`
# 3. In `src/Makefile.OCaml`:
# - Add `CAMLFLAGS+=-unsafe-string` before `INCLFLAGS`
# - Change MINOSXVERSION to 11.3
# 4. In `src/system/system_generic.ml`, change to `let symlink s1 s2 = Unix.symlink s1 s2`
# Buildddddd
make UISTYLE=text install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment