mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
Merge pull request #155003 from vbgl/ocaml-z3-fix
ocamlPackages.z3: fix build
This commit is contained in:
commit
de2e276bad
@ -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 {
|
||||
|
||||
|
13
pkgs/development/ocaml-modules/z3/ocamlfind.patch
Normal file
13
pkgs/development/ocaml-modules/z3/ocamlfind.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/scripts/mk_util.py b/scripts/mk_util.py
|
||||
index 042e6af46..1e105b002 100644
|
||||
--- a/scripts/mk_util.py
|
||||
+++ b/scripts/mk_util.py
|
||||
@@ -1995,7 +1995,7 @@ class MLComponent(Component):
|
||||
|
||||
LIBZ3 = LIBZ3 + ' ' + ' '.join(map(lambda x: '-cclib ' + x, LDFLAGS.split()))
|
||||
|
||||
- stubs_install_path = '$$(%s printconf path)/stublibs' % OCAMLFIND
|
||||
+ stubs_install_path = '$$(%s printconf destdir)/stublibs' % OCAMLFIND
|
||||
if not STATIC_LIB:
|
||||
loadpath = '-ccopt -L' + stubs_install_path
|
||||
dllpath = '-dllpath ' + stubs_install_path
|
Loading…
Reference in New Issue
Block a user