-
Notifications
You must be signed in to change notification settings - Fork 77
/
shell.nix
30 lines (29 loc) · 1.29 KB
/
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
with import <nixpkgs> { };
let
opkgs = pkgs.ocamlPackages;
ppx_deriving_protobuf = opkgs.callPackage ./scripts/nix/ppx_deriving_protobuf.nix { };
ocaml-protoc = opkgs.callPackage ./scripts/nix/ocaml-protoc.nix { inherit ppx_deriving_protobuf; };
rpclib = opkgs.callPackage ./scripts/nix/rpclib.nix { };
ppx_deriving_rpc = opkgs.callPackage ./scripts/nix/ppx_deriving_rpc.nix { inherit rpclib; };
ocamlVersion = opkgs.ocaml.version;
systemPkgs = [
m4 ocaml cmake opam gcc dune ncurses boost openssl
zlib gmp procps secp256k1 libffi pkgconfig pcre patdiff
];
ocamlPkgs = with opkgs; [
base core core_bench core_profiler ppx_deriving ppx_tools_versioned
ppx_sexp_conv bisect_ppx fileutils hex stdint zarith cryptokit
bitstring ctypes findlib utop angstrom ounit expect_test_helpers patience_diff
ocaml_pcre merlin ocp-indent ocp-index yojson menhir secp256k1 rpclib
ppx_deriving_protobuf ocaml-protoc ppx_deriving_rpc result rresult xmlm
];
packages = systemPkgs ++ ocamlPkgs;
mkpath = p: "${p}/lib/ocaml/${ocamlVersion}/site-lib";
paths = builtins.concatStringsSep ":" (map mkpath ocamlPkgs);
siteLisp = "share/emacs/site-lisp";
in pkgs.mkShell {
buildInputs = packages;
shellHook = with opkgs; ''
export OCAML_TOPLEVEL_PATH="${mkpath findlib}"
'';
}