2018-09-05 18:11:47 +02:00
|
|
|
{ stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune
|
2019-07-25 18:44:33 +02:00
|
|
|
, menhir, merlin-extend, ppx_tools_versioned, utop, cppo
|
|
|
|
, ocaml_lwt
|
2018-09-01 05:12:58 +02:00
|
|
|
}:
|
2017-04-08 13:34:41 +02:00
|
|
|
|
2018-09-01 05:12:58 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-reason-${version}";
|
2019-11-04 17:51:05 +01:00
|
|
|
version = "3.5.1";
|
2017-10-27 13:14:29 +02:00
|
|
|
|
2017-04-08 13:34:41 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "reason";
|
2019-11-04 17:51:05 +01:00
|
|
|
rev = "aea245a43eb44034d2fccac7028b640a437af239";
|
|
|
|
sha256 = "0ff7rjxbsg9zkq6sxlm9bkx7yk8x2cvras7z8436msczgd1wmmyf";
|
2017-04-08 13:34:41 +02:00
|
|
|
};
|
|
|
|
|
2018-10-28 14:06:02 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2019-07-25 18:24:18 +02:00
|
|
|
propagatedBuildInputs = [ menhir merlin-extend ppx_tools_versioned ];
|
2017-04-08 13:34:41 +02:00
|
|
|
|
2019-07-25 18:44:33 +02:00
|
|
|
buildInputs = [ ocaml findlib dune cppo utop menhir ];
|
2017-04-08 13:34:41 +02:00
|
|
|
|
|
|
|
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
|
|
|
|
|
2018-11-09 13:26:18 +01:00
|
|
|
inherit (dune) installPhase;
|
2017-04-08 13:34:41 +02:00
|
|
|
|
2018-11-09 13:26:18 +01:00
|
|
|
postInstall = ''
|
2017-04-08 13:34:41 +02:00
|
|
|
wrapProgram $out/bin/rtop \
|
|
|
|
--prefix PATH : "${utop}/bin" \
|
2019-11-14 19:44:07 +01:00
|
|
|
--prefix CAML_LD_LIBRARY_PATH : "${ocaml_lwt}/lib/ocaml/${ocaml.version}/site-lib" \
|
|
|
|
--prefix OCAMLPATH : "$out/lib/ocaml/${ocaml.version}/site-lib"
|
2017-04-08 13:34:41 +02:00
|
|
|
'';
|
2017-10-27 13:14:29 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-12-09 12:24:59 +01:00
|
|
|
homepage = https://reasonml.github.io/;
|
2017-10-27 13:14:29 +02:00
|
|
|
description = "Facebook's friendly syntax to OCaml";
|
2018-08-07 11:58:21 +02:00
|
|
|
license = licenses.mit;
|
2018-09-01 05:12:58 +02:00
|
|
|
inherit (ocaml.meta) platforms;
|
2017-10-27 13:14:29 +02:00
|
|
|
maintainers = [ maintainers.volth ];
|
|
|
|
};
|
2017-04-08 13:34:41 +02:00
|
|
|
}
|