1{
2 buildDunePackage,
3 reason,
4 cppo,
5 utop,
6 makeWrapper,
7}:
8
9buildDunePackage {
10 pname = "rtop";
11 inherit (reason) version src;
12
13 nativeBuildInputs = [
14 makeWrapper
15 cppo
16 ];
17
18 propagatedBuildInputs = [
19 reason
20 utop
21 ];
22
23 postInstall = ''
24 wrapProgram $out/bin/rtop \
25 --prefix PATH : "${utop}/bin" \
26 --prefix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH" \
27 --prefix OCAMLPATH : "$OCAMLPATH:$OCAMLFIND_DESTDIR"
28 '';
29
30 meta = reason.meta // {
31 description = "Toplevel (or REPL) for Reason, based on utop";
32 mainProgram = "rtop";
33 };
34}