summaryrefslogtreecommitdiff
path: root/misc/nix-ocaml-shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'misc/nix-ocaml-shell.nix')
-rw-r--r--misc/nix-ocaml-shell.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/misc/nix-ocaml-shell.nix b/misc/nix-ocaml-shell.nix
new file mode 100644
index 0000000..316f156
--- /dev/null
+++ b/misc/nix-ocaml-shell.nix
@@ -0,0 +1,25 @@
+with import <nixpkgs> {};
+
+let
+ libs = [
+ autoconf
+ 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
+ '';
+}