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

41 lines
1.1 KiB
Nix
Raw Normal View History

2018-09-05 16:11:47 +00:00
{ stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune
2020-02-04 08:49:23 +00:00
, fix, menhir, merlin-extend, ppx_tools_versioned, utop, cppo
}:
2017-04-08 11:34:41 +00:00
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-reason-${version}";
2020-04-02 19:28:10 +00:00
version = "3.6.0";
2017-10-27 11:14:29 +00:00
2017-04-08 11:34:41 +00:00
src = fetchFromGitHub {
owner = "facebook";
repo = "reason";
2020-04-02 19:28:10 +00:00
rev = "2860cc274b1b5b76a71d0e5190bf67a133d6f809";
sha256 = "05wcg0gfln85spjfgsij818h2sp4y6s8bvdcwmzv0r8jblr8402b";
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
2020-02-04 08:49:23 +00:00
buildInputs = [ ocaml findlib dune cppo fix 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" \
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 11:34:41 +00:00
'';
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
}