2018-09-05 17:11:47 +01:00
|
|
|
{ stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune
|
2020-02-04 08:49:23 +00:00
|
|
|
, fix, menhir, merlin-extend, ppx_tools_versioned, utop, cppo
|
2018-09-01 04:12:58 +01:00
|
|
|
}:
|
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}";
|
2020-02-04 08:49:23 +00:00
|
|
|
version = "3.5.4";
|
2017-10-27 12:14:29 +01:00
|
|
|
|
2017-04-08 12:34:41 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "reason";
|
2020-02-04 08:49:23 +00:00
|
|
|
rev = "e3287476e5c3f0cbcd9dc7ab18d290f81f4afa0c";
|
|
|
|
sha256 = "02p5d1x6lr7jp9mvgvsas3nnq3a97chxp5q6rl07n5qm61d5b4dl";
|
2017-04-08 12:34:41 +01:00
|
|
|
};
|
|
|
|
|
2018-10-28 13:06:02 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2019-07-25 17:24:18 +01:00
|
|
|
propagatedBuildInputs = [ menhir merlin-extend ppx_tools_versioned ];
|
2017-04-08 12:34:41 +01:00
|
|
|
|
2020-02-04 08:49:23 +00:00
|
|
|
buildInputs = [ ocaml findlib dune cppo fix utop menhir ];
|
2017-04-08 12:34:41 +01:00
|
|
|
|
|
|
|
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
|
|
|
|
|
2018-11-09 12:26:18 +00:00
|
|
|
inherit (dune) installPhase;
|
2017-04-08 12:34:41 +01:00
|
|
|
|
2018-11-09 12:26:18 +00:00
|
|
|
postInstall = ''
|
2017-04-08 12:34:41 +01:00
|
|
|
wrapProgram $out/bin/rtop \
|
|
|
|
--prefix PATH : "${utop}/bin" \
|
2020-02-04 08:49:23 +00:00
|
|
|
--prefix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH" \
|
|
|
|
--prefix OCAMLPATH : "$OCAMLPATH:$OCAMLFIND_DESTDIR"
|
2017-04-08 12:34:41 +01:00
|
|
|
'';
|
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
|
|
|
}
|