summary refs log tree commit diff
path: root/pkgs/applications/science/logic/beluga/default.nix
blob: 9af0cd694b70bff3455062f516783437e2b6d1e4 (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
34
35
36
37
38
39
40
{ lib, fetchFromGitHub, ocamlPackages, rsync }:

ocamlPackages.buildDunePackage rec {
  pname = "beluga";
  version = "1.0";

  src = fetchFromGitHub {
    owner  = "Beluga-lang";
    repo   = "Beluga";
    rev    = "v${version}";
    sha256 = "1ziqjfv8jwidl8lj2mid2shhgqhv31dfh5wad2zxjpvf6038ahsw";
  };

  useDune2 = true;

  buildInputs = with ocamlPackages; [
    gen sedlex ocaml_extlib dune-build-info linenoise
  ];

  postPatch = ''
    patchShebangs ./TEST ./run_harpoon_test.sh
  '';

  checkPhase = "./TEST";
  checkInputs = [ rsync ];
  doCheck = true;

  postInstall = ''
    mkdir -p $out/share/emacs/site-lisp/beluga/
    cp -r tools/beluga-mode.el $out/share/emacs/site-lisp/beluga
  '';

  meta = with lib; {
    description = "A functional language for reasoning about formal systems";
    homepage    = "http://complogic.cs.mcgill.ca/beluga/";
    license     = licenses.gpl3Plus;
    maintainers = [ maintainers.bcdarwin ];
    platforms   = platforms.unix;
  };
}