-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
35 lines (34 loc) · 803 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
with import <nixpkgs> {};
let
ocamlPackages = pkgs.recurseIntoAttrs pkgs.ocamlPackages_latest;
ocamlInit = pkgs.writeText "ocamlinit" ''
#use "topfind";;
#thread;;
#camlp4o;;
#require "core";;
#require "core.syntax";;
'';
in
pkgs.mkShell rec {
buildInputs = with pkgs; [
dune
] ++ ( with ocamlPackages;
[
ocaml
core
core_extended
findlib
utop
merlin
ocp-indent
]);
IN_NIX_SHELL = 1;
UTOP_SITE_LISP = "${ocamlPackages.utop}/share/emacs/site-lisp";
MERLIN_SITE_LISP = "${ocamlPackages.merlin}/share/emacs/site-lisp";
OCP_INDENT_SITE_LISP="${ocamlPackages.ocp-indent}/share/emacs/site-lisp";
OCAMLINIT = "${ocamlInit}";
shellHook = ''
alias utop="utop -init ${ocamlInit}"
alias ocaml="ocaml -init ${ocamlInit}"
'';
}