2018-05-29 07:26:45 +02:00
|
|
|
{ buildOcaml, opaline, js_build_tools, ocaml_oasis, fetchurl } :
|
2016-09-13 23:42:26 +02:00
|
|
|
|
|
|
|
{ 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;
|
|
|
|
|
2018-05-29 07:26:45 +02:00
|
|
|
buildInputs = [ ocaml_oasis js_build_tools opaline ] ++ buildInputs;
|
2016-09-13 23:42:26 +02:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
configurePhase = "./configure --prefix $out";
|
|
|
|
|
|
|
|
buildPhase = "OCAML_TOPLEVEL_PATH=`ocamlfind query findlib`/.. make";
|
|
|
|
|
2018-05-29 07:26:45 +02:00
|
|
|
installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install";
|
2016-09-13 23:42:26 +02:00
|
|
|
|
|
|
|
})
|