2018-05-29 05:26:45 +00:00
|
|
|
{ buildOcaml, opaline, js_build_tools, ocaml_oasis, fetchurl } :
|
2016-09-13 21:42:26 +00:00
|
|
|
|
2021-10-31 12:35:20 +00:00
|
|
|
{ pname, version ? "113.33.03", buildInputs ? [],
|
2016-09-13 21:42:26 +00:00
|
|
|
hash ? "",
|
|
|
|
minimumSupportedOcamlVersion ? "4.02", ...
|
|
|
|
}@args:
|
|
|
|
|
|
|
|
buildOcaml (args // {
|
2021-10-31 12:35:20 +00:00
|
|
|
inherit pname version minimumSupportedOcamlVersion;
|
2016-09-13 21:42:26 +00:00
|
|
|
src = fetchurl {
|
2021-10-31 12:35:20 +00:00
|
|
|
url = "https://github.com/janestreet/${pname}/archive/${version}.tar.gz";
|
2016-09-13 21:42:26 +00:00
|
|
|
sha256 = hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
hasSharedObjects = true;
|
|
|
|
|
2018-05-29 05:26:45 +00:00
|
|
|
buildInputs = [ ocaml_oasis js_build_tools opaline ] ++ buildInputs;
|
2016-09-13 21:42:26 +00:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
2021-08-14 12:00:00 +00:00
|
|
|
dontAddStaticConfigureFlags = true;
|
|
|
|
configurePlatforms = [];
|
2016-09-13 21:42:26 +00:00
|
|
|
|
2021-10-31 12:35:20 +00:00
|
|
|
configurePhase = ''
|
|
|
|
./configure --prefix $out
|
|
|
|
'';
|
2016-09-13 21:42:26 +00:00
|
|
|
|
2021-10-31 12:35:20 +00:00
|
|
|
buildPhase = ''
|
|
|
|
OCAML_TOPLEVEL_PATH=`ocamlfind query findlib`/.. make
|
|
|
|
'';
|
2016-09-13 21:42:26 +00:00
|
|
|
|
2021-10-31 12:35:20 +00:00
|
|
|
installPhase = ''
|
|
|
|
opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${pname}.install
|
|
|
|
'';
|
2016-09-13 21:42:26 +00:00
|
|
|
|
|
|
|
})
|