From 563a444ea9f19ec55b53e82f17f5b97357e56691 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 19 Oct 2018 23:38:14 +0200 Subject: _oasis: opam: nix: add build and env setup --- misc/nix-ocaml-shell.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 misc/nix-ocaml-shell.nix (limited to 'misc') 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 {}; + +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 + ''; +} -- cgit v1.2.3