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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.4 KiB
Nix
Raw Normal View History

2022-03-11 07:12:25 +00:00
{ lib, callPackage, stdenv, makeWrapper, fetchurl, ocaml, findlib, dune_2
, fix, menhir, menhirLib, menhirSdk, merlin-extend, ppxlib, utop, cppo, ppx_derivers
}:
2017-04-08 11:34:41 +00:00
stdenv.mkDerivation rec {
2021-04-07 06:04:16 +00:00
pname = "ocaml${ocaml.version}-reason";
2022-03-11 07:12:25 +00:00
version = "3.8.0";
2017-10-27 11:14:29 +00:00
2022-03-11 07:12:25 +00:00
src = fetchurl {
url = "https://github.com/reasonml/reason/releases/download/${version}/reason-${version}.tbz";
sha256 = "sha256:0yc94m3ddk599crg33yxvkphxpy54kmdsl599c320wvn055p4y4l";
2017-04-08 11:34:41 +00:00
};
nativeBuildInputs = [
makeWrapper
menhir
];
buildInputs = [
cppo
dune_2
findlib
fix
menhir
menhirSdk
ocaml
ppxlib
utop
];
propagatedBuildInputs = [
menhirLib
merlin-extend
ppx_derivers
];
2017-04-08 11:34:41 +00:00
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
2020-12-29 15:11:59 +00:00
installPhase = ''
2022-03-11 07:12:25 +00:00
runHook preInstall
2020-12-29 15:11:59 +00:00
dune install --prefix=$out --libdir=$OCAMLFIND_DESTDIR
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"
2022-03-11 07:12:25 +00:00
runHook postInstall
2017-04-08 11:34:41 +00:00
'';
2017-10-27 11:14:29 +00:00
passthru.tests = {
hello = callPackage ./tests/hello { };
};
meta = with lib; {
homepage = "https://reasonml.github.io/";
downloadPage = "https://github.com/reasonml/reason";
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;
2021-11-03 00:38:27 +00:00
maintainers = with maintainers; [ ];
2017-10-27 11:14:29 +00:00
};
2017-04-08 11:34:41 +00:00
}