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