2018-09-05 17:11:47 +01:00
|
|
|
{ stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune
|
2018-09-01 04:12:58 +01:00
|
|
|
, menhir, merlin_extend, ppx_tools_versioned, utop
|
|
|
|
}:
|
2017-04-08 12:34:41 +01:00
|
|
|
|
2018-09-01 04:12:58 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-reason-${version}";
|
2018-08-13 10:09:22 +01:00
|
|
|
version = "3.3.3";
|
2017-10-27 12:14:29 +01:00
|
|
|
|
2017-04-08 12:34:41 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "reason";
|
2018-08-13 10:09:22 +01:00
|
|
|
rev = "fefe5e4db3a54a7946c2220ee037dd2f407011c9";
|
|
|
|
sha256 = "1x0dbacgq9pa36zgzwrc0gm14wbb6v27y9bf7wcwk55a1ck0am18";
|
2017-04-08 12:34:41 +01:00
|
|
|
};
|
|
|
|
|
2017-10-27 12:14:29 +01:00
|
|
|
propagatedBuildInputs = [ menhir merlin_extend ppx_tools_versioned ];
|
2017-04-08 12:34:41 +01:00
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildInputs = [ makeWrapper ocaml findlib dune utop menhir ];
|
2017-04-08 12:34:41 +01:00
|
|
|
|
|
|
|
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-08-07 10:58:21 +01:00
|
|
|
for p in reason rtop
|
|
|
|
do
|
2018-09-05 17:11:47 +01:00
|
|
|
${dune.installPhase} $p.install
|
2018-08-07 10:58:21 +01:00
|
|
|
done
|
2017-04-08 12:34:41 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/rtop \
|
|
|
|
--prefix PATH : "${utop}/bin" \
|
|
|
|
--set OCAMLPATH $out/lib/ocaml/${ocaml.version}/site-lib:$OCAMLPATH
|
|
|
|
'';
|
2017-10-27 12:14:29 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-12-09 11:24:59 +00:00
|
|
|
homepage = https://reasonml.github.io/;
|
2017-10-27 12:14:29 +01:00
|
|
|
description = "Facebook's friendly syntax to OCaml";
|
2018-08-07 10:58:21 +01:00
|
|
|
license = licenses.mit;
|
2018-09-01 04:12:58 +01:00
|
|
|
inherit (ocaml.meta) platforms;
|
2017-10-27 12:14:29 +01:00
|
|
|
maintainers = [ maintainers.volth ];
|
|
|
|
};
|
2017-04-08 12:34:41 +01:00
|
|
|
}
|