diff options
Diffstat (limited to 'pkgs/development/ocaml-modules/z3/default.nix')
-rw-r--r-- | pkgs/development/ocaml-modules/z3/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/development/ocaml-modules/z3/default.nix b/pkgs/development/ocaml-modules/z3/default.nix index 01b384fe0ba50..43fc5b245c8d8 100644 --- a/pkgs/development/ocaml-modules/z3/default.nix +++ b/pkgs/development/ocaml-modules/z3/default.nix @@ -1,9 +1,18 @@ -{ stdenv, ocaml, findlib, zarith, z3 }: +{ stdenv, lib, ocaml, findlib, zarith, z3 }: -let z3-with-ocaml = z3.override { +if !lib.versionAtLeast ocaml.version "4.07" +then throw "z3 is not available for OCaml ${ocaml.version}" +else + +let z3-with-ocaml = (z3.override { ocamlBindings = true; inherit ocaml findlib zarith; -}; in +}).overrideAttrs (o: { + patches = (o.patches or []) ++ [ + # Fix build; see: https://github.com/Z3Prover/z3/issues/5776 + ./ocamlfind.patch + ]; +}); in stdenv.mkDerivation { |