summaryrefslogtreecommitdiff
path: root/misc/nix-ocaml-shell.nix
blob: 8a61a5bddffcf47a74b3c7e5da9d87d58bf76ddd (plain)
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
with import <nixpkgs> {};

let
  libs = [
    autoconf
    gmp
    bubblewrap
    binutils
    curl
    gcc
    libtool
    m4
    ocaml
    pkgconfig
  ];
in
stdenv.mkDerivation rec {
  name = "ocaml-env";
  buildInputs = libs;

  # configure opam with sandboxing
  shellHook = ''
    . /home/phg/.opam/opam-init/init.sh &>/dev/null || true
    export OPAM_USER_PATH_RO=/nix/store
  '';
}