2024-01-02 11:29:13 +00:00
|
|
|
{ darwin, fetchurl, lib, ocamlPackages, stdenv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "alt-ergo";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "2.6.0";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/OCamlPro/alt-ergo/releases/download/v${version}/alt-ergo-${version}.tbz";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-EmkxGvJSeKRmiSuoeMyIi6WfF39T3QPxKixiOwP8834=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
|
|
|
|
pname = "alt-ergo-lib";
|
2023-10-09 19:29:22 +00:00
|
|
|
inherit version src;
|
|
|
|
buildInputs = with ocamlPackages; [ ppx_blob ];
|
2024-10-04 16:56:33 +00:00
|
|
|
propagatedBuildInputs = with ocamlPackages; [
|
|
|
|
camlzip
|
|
|
|
dolmen_loop
|
|
|
|
dune-build-info
|
|
|
|
fmt
|
|
|
|
ocplib-simplex
|
|
|
|
ppx_deriving
|
|
|
|
seq
|
|
|
|
stdlib-shims
|
|
|
|
zarith
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
}; in
|
|
|
|
|
|
|
|
let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
|
|
|
|
pname = "alt-ergo-parsers";
|
2023-10-09 19:29:22 +00:00
|
|
|
inherit version src;
|
|
|
|
nativeBuildInputs = [ ocamlPackages.menhir ];
|
|
|
|
propagatedBuildInputs = [ alt-ergo-lib ] ++ (with ocamlPackages; [ psmt2-frontend ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
}; in
|
|
|
|
|
|
|
|
ocamlPackages.buildDunePackage {
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
inherit pname version src;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
nativeBuildInputs = [ ocamlPackages.menhir ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ];
|
2024-10-04 16:56:33 +00:00
|
|
|
propagatedBuildInputs = [ alt-ergo-parsers ] ++ (with ocamlPackages; [ cmdliner dune-site ppxlib ]);
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
dune install --prefix $bin ${pname}
|
|
|
|
mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib
|
|
|
|
mv $bin/lib/alt-ergo $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
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 ];
|
|
|
|
};
|
|
|
|
}
|