2021-06-08 22:20:38 +01:00
|
|
|
{ lib, callPackage, stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune_2
|
|
|
|
, fix, menhir, menhirLib, menhirSdk, merlin-extend, ppxlib, utop, cppo, ppx_derivers
|
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 {
|
2021-04-07 07:04:16 +01:00
|
|
|
pname = "ocaml${ocaml.version}-reason";
|
|
|
|
version = "3.7.0";
|
2017-10-27 12:14:29 +01:00
|
|
|
|
2017-04-08 12:34:41 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "reason";
|
2021-04-07 07:04:16 +01:00
|
|
|
rev = "daa11255cb4716ce1c370925251021bd6e3bd974";
|
|
|
|
sha256 = "0m6ldrci1a4j0qv1cbwh770zni3al8qxsphl353rv19f6rblplhs";
|
2017-04-08 12:34:41 +01:00
|
|
|
};
|
|
|
|
|
2021-06-08 22:20:38 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
menhir
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cppo
|
|
|
|
dune_2
|
|
|
|
findlib
|
|
|
|
fix
|
|
|
|
menhir
|
|
|
|
menhirSdk
|
|
|
|
ocaml
|
|
|
|
ppxlib
|
|
|
|
utop
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
menhirLib
|
|
|
|
merlin-extend
|
|
|
|
ppx_derivers
|
|
|
|
];
|
2017-04-08 12:34:41 +01:00
|
|
|
|
|
|
|
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
|
|
|
|
|
2020-12-29 15:11:59 +00:00
|
|
|
installPhase = ''
|
|
|
|
dune install --prefix=$out --libdir=$OCAMLFIND_DESTDIR
|
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
|
|
|
|
2021-06-08 22:20:38 +01:00
|
|
|
passthru.tests = {
|
|
|
|
hello = callPackage ./tests/hello { };
|
|
|
|
};
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://reasonml.github.io/";
|
2021-06-08 22:20:38 +01:00
|
|
|
downloadPage = "https://github.com/reasonml/reason";
|
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;
|
2021-06-08 22:20:38 +01:00
|
|
|
maintainers = with maintainers; [ superherointj ];
|
2017-10-27 12:14:29 +01:00
|
|
|
};
|
2017-04-08 12:34:41 +01:00
|
|
|
}
|