2022-06-16 17:23:12 +00:00
|
|
|
{ fetchFromGitHub, fetchpatch, lib, which, ocamlPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "alt-ergo";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "2.4.2";
|
|
|
|
|
|
|
|
configureScript = "ocaml unix.cma configure.ml";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OCamlPro";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-8pJ/1UAbheQaLFs5Uubmmf5D0oFJiPxF6e2WTZgRyAc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
|
|
|
|
pname = "alt-ergo-lib";
|
2022-08-21 13:32:41 +00:00
|
|
|
inherit version src configureScript;
|
2022-06-16 17:23:12 +00:00
|
|
|
configureFlags = [ pname ];
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ which ];
|
2021-04-26 19:14:03 +00:00
|
|
|
buildInputs = with ocamlPackages; [ dune-configurator ];
|
2022-08-21 13:32:41 +00:00
|
|
|
propagatedBuildInputs = with ocamlPackages; [ num ocplib-simplex seq stdlib-shims zarith ];
|
2022-12-17 10:02:37 +00:00
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace src/lib/util/version.ml --replace 'version="dev"' 'version="${version}"'
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
}; in
|
|
|
|
|
|
|
|
let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
|
|
|
|
pname = "alt-ergo-parsers";
|
2022-08-21 13:32:41 +00:00
|
|
|
inherit version src configureScript;
|
2022-06-16 17:23:12 +00:00
|
|
|
configureFlags = [ pname ];
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ which ocamlPackages.menhir ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ alt-ergo-lib ] ++ (with ocamlPackages; [ camlzip psmt2-frontend ]);
|
|
|
|
}; in
|
|
|
|
|
|
|
|
ocamlPackages.buildDunePackage {
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
inherit pname version src configureScript;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
configureFlags = [ pname ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ which ocamlPackages.menhir ];
|
2022-09-22 12:36:57 +00:00
|
|
|
buildInputs = [ alt-ergo-parsers ocamlPackages.cmdliner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "High-performance theorem prover and SMT solver";
|
|
|
|
homepage = "https://alt-ergo.ocamlpro.com/";
|
|
|
|
license = lib.licenses.ocamlpro_nc;
|
|
|
|
maintainers = [ lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|