1 { stdenv, lib, ocaml, findlib, zarith, z3 }:
3 if lib.versionOlder ocaml.version "4.07"
4 then throw "z3 is not available for OCaml ${ocaml.version}"
7 let z3-with-ocaml = (z3.override {
9 inherit ocaml findlib zarith;
14 pname = "ocaml${ocaml.version}-z3";
15 inherit (z3-with-ocaml) version;
21 mkdir -p $OCAMLFIND_DESTDIR
22 cp -r ${z3-with-ocaml.ocaml}/lib/ocaml/${ocaml.version}/site-lib/stublibs $OCAMLFIND_DESTDIR
23 cp -r ${z3-with-ocaml.ocaml}/lib/ocaml/${ocaml.version}/site-lib/Z3 $OCAMLFIND_DESTDIR/z3
27 nativeBuildInputs = [ findlib ];
28 propagatedBuildInputs = [ zarith ];
33 description = "Z3 Theorem Prover (OCaml API)";