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

40 lines
1.1 KiB
Nix
Raw Normal View History

2018-09-05 18:11:47 +02:00
{ stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune
, menhir, merlin_extend, ppx_tools_versioned, utop
}:
2017-04-08 13:34:41 +02:00
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-reason-${version}";
version = "3.3.7";
2017-10-27 13:14:29 +02:00
2017-04-08 13:34:41 +02:00
src = fetchFromGitHub {
owner = "facebook";
repo = "reason";
rev = "4d20e5b535c29c5ef1283e65958b32996e449e5a";
sha256 = "0f3pb61wg58g8f3wcnp1h4gpmnwmp7bq0cnqdfwldmh9cs0dqyfk";
2017-04-08 13:34:41 +02:00
};
nativeBuildInputs = [ makeWrapper ];
2017-10-27 13:14:29 +02:00
propagatedBuildInputs = [ menhir merlin_extend ppx_tools_versioned ];
2017-04-08 13:34:41 +02:00
buildInputs = [ ocaml findlib dune utop menhir ];
2017-04-08 13:34:41 +02:00
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
inherit (dune) installPhase;
2017-04-08 13:34:41 +02:00
postInstall = ''
2017-04-08 13:34:41 +02:00
wrapProgram $out/bin/rtop \
--prefix PATH : "${utop}/bin" \
--set OCAMLPATH $out/lib/ocaml/${ocaml.version}/site-lib:$OCAMLPATH
'';
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;
inherit (ocaml.meta) platforms;
2017-10-27 13:14:29 +02:00
maintainers = [ maintainers.volth ];
};
2017-04-08 13:34:41 +02:00
}