nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 ocaml,
5 findlib,
6 zarith,
7 z3,
8}:
9
10let
11 z3-with-ocaml = (
12 z3.override {
13 ocamlBindings = true;
14 inherit ocaml findlib zarith;
15 }
16 );
17in
18
19stdenv.mkDerivation {
20
21 pname = "ocaml${ocaml.version}-z3";
22 inherit (z3-with-ocaml) version;
23
24 dontUnpack = true;
25
26 installPhase = ''
27 runHook preInstall
28 mkdir -p $OCAMLFIND_DESTDIR
29 cp -r ${z3-with-ocaml.ocaml}/lib/ocaml/${ocaml.version}/site-lib/stublibs $OCAMLFIND_DESTDIR
30 cp -r ${z3-with-ocaml.ocaml}/lib/ocaml/${ocaml.version}/site-lib/Z3 $OCAMLFIND_DESTDIR/z3
31 runHook postInstall
32 '';
33
34 nativeBuildInputs = [ findlib ];
35 propagatedBuildInputs = [
36 z3-with-ocaml.lib
37 zarith
38 ];
39
40 strictDeps = true;
41
42 meta = z3.meta // {
43 description = "Z3 Theorem Prover (OCaml API)";
44 broken = lib.versionOlder ocaml.version "4.08";
45 };
46}