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";
|
2021-10-14 00:43:12 +00:00
|
|
|
version = "2.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OCamlPro";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-14 00:43:12 +00:00
|
|
|
sha256 = "0hglj1p0753w2isds01h90knraxa42d2jghr35dpwf9g8a1sm9d3";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
|
|
|
|
pname = "alt-ergo-lib";
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit version src;
|
|
|
|
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 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = with ocamlPackages; [ num ocplib-simplex stdlib-shims zarith ];
|
|
|
|
}; in
|
|
|
|
|
|
|
|
let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
|
|
|
|
pname = "alt-ergo-parsers";
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit version src;
|
|
|
|
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-06-16 17:23:12 +00:00
|
|
|
inherit pname version src;
|
|
|
|
|
|
|
|
# Ensure compatibility with Menhir ≥ 20211215
|
|
|
|
patches = fetchpatch {
|
|
|
|
url = "https://github.com/OCamlPro/alt-ergo/commit/0f9c45af352657c3aec32fca63d11d44f5126df8.patch";
|
|
|
|
sha256 = "sha256:0zaj3xbk2s8k8jl0id3nrhdfq9mv0n378cbawwx3sziiizq7djbg";
|
|
|
|
};
|
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 ];
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|