nixpkgs/pkgs/development/compilers/reason/default.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

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