Last active
June 24, 2016 23:04
-
-
Save btbytes/109afbaa10ba104361e3d086921509c1 to your computer and use it in GitHub Desktop.
Code etc., related to "Modern OCaml Development Setup"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install opam | |
==> Installing dependencies for opam: ocaml, ocamlbuild, camlp4, gringo | |
==> Installing opam dependency: ocaml | |
==> Downloading https://homebrew.bintray.com/bottles/ocaml-4.03.0.yosemite.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring ocaml-4.03.0.yosemite.bottle.tar.gz | |
🍺 /usr/local/Cellar/ocaml/4.03.0: 1,641 files, 173.7M | |
==> Installing opam dependency: ocamlbuild | |
==> Downloading https://homebrew.bintray.com/bottles/ocamlbuild-0.9.2.yosemite.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring ocamlbuild-0.9.2.yosemite.bottle.tar.gz | |
🍺 /usr/local/Cellar/ocamlbuild/0.9.2: 26 files, 6.6M | |
==> Installing opam dependency: camlp4 | |
==> Downloading https://homebrew.bintray.com/bottles/camlp4-4.03+1.yosemite.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring camlp4-4.03+1.yosemite.bottle.tar.gz | |
🍺 /usr/local/Cellar/camlp4/4.03+1: 164 files, 142.2M | |
==> Installing opam dependency: gringo | |
==> Downloading https://homebrew.bintray.com/bottles/gringo-4.5.3.yosemite.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring gringo-4.5.3.yosemite.bottle.tar.gz | |
🍺 /usr/local/Cellar/gringo/4.5.3: 7 files, 5.7M | |
==> Installing opam | |
==> Downloading https://homebrew.bintray.com/bottles/opam-1.2.2_2.yosemite.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring opam-1.2.2_2.yosemite.bottle.tar.gz | |
==> Caveats | |
OPAM uses ~/.opam by default for its package database, so you need to | |
initialize it first by running (as a normal user): | |
$ opam init | |
Run the following to initialize your environment variables: | |
$ eval `opam config env` | |
To export the needed variables every time, add them to your dotfiles. | |
* On Bash, add them to `~/.bash_profile`. | |
* On Zsh, add them to `~/.zprofile` or `~/.zshrc` instead. | |
Documentation and tutorials are available at https://opam.ocaml.org, or | |
via "man opam" and "opam --help". | |
Bash completion has been installed to: | |
/usr/local/etc/bash_completion.d | |
zsh completion has been installed to: | |
/usr/local/share/zsh/site-functions | |
==> Summary | |
🍺 /usr/local/Cellar/opam/1.2.2_2: 30 files, 14.9M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ opam init | |
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect! | |
=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫 | |
[default] synchronized from https://opam.ocaml.org | |
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫 | |
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫 | |
∗ installed base-bigarray.base | |
∗ installed base-threads.base | |
∗ installed base-unix.base | |
Done. | |
In normal operation, OPAM only alters files within ~/.opam. | |
During this initialisation, you can allow OPAM to add information to two | |
other files for best results. You can also make these additions manually | |
if you wish. | |
If you agree, OPAM will modify: | |
- ~/.zshrc (or a file you specify) to set the right environment | |
variables and to load the auto-completion scripts for your shell (zsh) | |
on startup. Specifically, it checks for and appends the following line: | |
. /Users/pgowda/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true | |
- ~/.ocamlinit to ensure that non-system installations of `ocamlfind` | |
(i.e. those installed by OPAM) will work correctly when running the | |
OCaml toplevel. It does this by adding $OCAML_TOPLEVEL_PATH to the list | |
of include directories. | |
If you choose to not configure your system now, you can either configure | |
OPAM manually (instructions will be displayed) or launch the automatic setup | |
later by running: | |
opam config setup -a | |
Do you want OPAM to modify ~/.zshrc and ~/.ocamlinit? | |
(default is 'no', use 'f' to name a file other than ~/.zshrc) | |
[N/y/f] Y | |
User configuration: | |
~/.ocamlinit is already up-to-date. | |
~/.zshrc is already up-to-date. | |
Global configuration: | |
Updating ~/.opam/opam-init/init.sh | |
Updating ~/.opam/opam-init/init.zsh | |
Updating ~/.opam/opam-init/init.csh | |
Updating ~/.opam/opam-init/init.fish | |
# To setup the new switch in the current shell, you need to run: | |
eval `opam config env` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment