From 2e51c60b08aae169122b4c1ca18cf18d7733708e Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Wed, 16 Mar 2016 21:50:11 +0100 Subject: ocamlPackages.containers: 0.15 -> 0.16 --- .../ocaml-modules/containers/default.nix | 30 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/containers/default.nix b/pkgs/development/ocaml-modules/containers/default.nix index 8a03098d84b9..4a3ed5723ddd 100644 --- a/pkgs/development/ocaml-modules/containers/default.nix +++ b/pkgs/development/ocaml-modules/containers/default.nix @@ -1,6 +1,14 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, cppo, gen, sequence, qtest, ounit }: +{ stdenv, fetchFromGitHub, ocaml, findlib, cppo, gen, sequence, qtest, ounit, ocaml_oasis, result }: -let version = "0.15"; in +let + + mkpath = p: + let v = stdenv.lib.getVersion ocaml; in + "${p}/lib/ocaml/${v}/site-lib"; + + version = "0.16"; + +in stdenv.mkDerivation { name = "ocaml-containers-${version}"; @@ -9,10 +17,24 @@ stdenv.mkDerivation { owner = "c-cube"; repo = "ocaml-containers"; rev = "${version}"; - sha256 = "13mdl8jp4ymg1wip7lqmh4224x4jnji3frm1ik55vvm3ac8caqng"; + sha256 = "1mc33b4nvn9k3r4k56amxr804bg5ndhxv92cmjzg5pf4qh220c2h"; }; - buildInputs = [ ocaml findlib cppo gen sequence qtest ounit ]; + buildInputs = [ ocaml findlib cppo gen sequence qtest ounit ocaml_oasis ]; + + propagatedBuildInputs = [ result ]; + + preConfigure = '' + # The following is done so that the '#use "topfind"' directive works in the ocaml top-level + export HOME="$(mktemp -d)" + export OCAML_TOPLEVEL_PATH="${mkpath findlib}" + cat < $HOME/.ocamlinit +let () = + try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") + with Not_found -> () +;; +EOF + ''; configureFlags = [ "--enable-unix" -- cgit 1.4.1