nixpkgs-suyu/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix

36 lines
815 B
Nix
Raw Normal View History

{ 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;
buildInputs = [ ocaml_oasis js_build_tools opaline ] ++ buildInputs;
2016-09-13 23:42:26 +02:00
dontAddPrefix = true;
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
})