1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 09:53:17 +00:00
nixpkgs/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix
2018-06-06 07:14:25 +00:00

28 lines
716 B
Nix

{ buildOcaml, opaline, js_build_tools, ocaml_oasis, fetchurl } :
{ name, version ? "113.33.03", buildInputs ? [],
hash ? "",
minimumSupportedOcamlVersion ? "4.02", ...
}@args:
buildOcaml (args // {
inherit name version minimumSupportedOcamlVersion;
src = fetchurl {
url = "https://github.com/janestreet/${name}/archive/${version}.tar.gz";
sha256 = hash;
};
hasSharedObjects = true;
buildInputs = [ ocaml_oasis js_build_tools opaline ] ++ buildInputs;
dontAddPrefix = true;
configurePhase = "./configure --prefix $out";
buildPhase = "OCAML_TOPLEVEL_PATH=`ocamlfind query findlib`/.. make";
installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install";
})