2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune_2
|
2020-04-24 23:36:52 +00:00
|
|
|
, fix, menhir, merlin-extend, ppx_tools_versioned, utop, cppo
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-reason-${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "3.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "reason";
|
2020-09-25 04:45:31 +00:00
|
|
|
rev = "6017d6dd930f4989177c3f7c3c20cffbaabaa49a";
|
|
|
|
sha256 = "17wkcl3r0ckhlki9fk0mcwbnd7kpkqm1h0xjw2j2x1097n470df0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ menhir merlin-extend ppx_tools_versioned ];
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
buildInputs = [ ocaml findlib dune_2 cppo fix utop menhir ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
installPhase = ''
|
|
|
|
dune install --prefix=$out --libdir=$OCAMLFIND_DESTDIR
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapProgram $out/bin/rtop \
|
|
|
|
--prefix PATH : "${utop}/bin" \
|
|
|
|
--prefix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH" \
|
|
|
|
--prefix OCAMLPATH : "$OCAMLPATH:$OCAMLFIND_DESTDIR"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://reasonml.github.io/";
|
|
|
|
description = "Facebook's friendly syntax to OCaml";
|
|
|
|
license = licenses.mit;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
maintainers = [ maintainers.volth ];
|
|
|
|
};
|
|
|
|
}
|