summary refs log tree commit diff
path: root/pkgs/applications/science/logic/alt-ergo/default.nix
blob: e396f1c4a91a1e82a5ac275b1dcd70e2013c4921 (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
41
42
43
44
45
46
47
{ fetchurl, lib, which, ocamlPackages }:

let
  pname = "alt-ergo";
  version = "2.3.2";

  src = fetchurl {
    url = "https://alt-ergo.ocamlpro.com/http/alt-ergo-${version}/alt-ergo-${version}.tar.gz";
    sha256 = "130hisjzkaslygipdaaqib92spzx9rapsd45dbh5ssczjn5qnhb9";
  };

  preConfigure = "patchShebangs ./configure";

  nativeBuildInputs = [ which ];

in

let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
  pname = "alt-ergo-lib";
  inherit version src preConfigure nativeBuildInputs;
  configureFlags = pname;
  propagatedBuildInputs = with ocamlPackages; [ num ocplib-simplex stdlib-shims zarith ];
}; in

let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
  pname = "alt-ergo-parsers";
  inherit version src preConfigure nativeBuildInputs;
  configureFlags = pname;
  buildInputs = with ocamlPackages; [ menhir ];
  propagatedBuildInputs = [ alt-ergo-lib ] ++ (with ocamlPackages; [ camlzip psmt2-frontend ]);
}; in

ocamlPackages.buildDunePackage {

  inherit pname version src preConfigure nativeBuildInputs;

  configureFlags = pname;

  buildInputs = [ alt-ergo-parsers ocamlPackages.menhir ];

  meta = {
    description = "High-performance theorem prover and SMT solver";
    homepage    = "https://alt-ergo.ocamlpro.com/";
    license     = lib.licenses.ocamlpro_nc;
    maintainers = [ lib.maintainers.thoughtpolice ];
  };
}