summary refs log tree commit diff
path: root/pkgs/development/tools/ocaml/ocaml-top/default.nix
blob: ddea2aa9784b475d46b10b46ae95362052cdc82d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchzip, ncurses
, ocamlPackages
, dune
}:

stdenv.mkDerivation rec {
  version = "1.1.5";
  name = "ocaml-top-${version}";
  src = fetchzip {
    url = "https://github.com/OCamlPro/ocaml-top/archive/${version}.tar.gz";
    sha256 = "1d4i6aanrafgrgk4mh154k6lkwk0b6mh66rykz33awlf5pfqd8yv";
  };

  buildInputs = [ ncurses dune ]
  ++ (with ocamlPackages; [ ocaml ocp-build findlib lablgtk ocp-index ]);

  configurePhase = ''
    export TERM=xterm
    ocp-build -init
  '';

  buildPhase = "jbuilder build";

  inherit (dune) installPhase;

  meta = {
    homepage = https://www.typerex.org/ocaml-top.html;
    license = stdenv.lib.licenses.gpl3;
    description = "A simple cross-platform OCaml code editor built for top-level evaluation";
    platforms = ocamlPackages.ocaml.meta.platforms or [];
    maintainers = with stdenv.lib.maintainers; [ vbgl ];
  };
}