commit
17c6edb8da
@ -1,9 +1,15 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, python, fixDarwinDylibNames
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, python
|
||||||
|
, fixDarwinDylibNames
|
||||||
, javaBindings ? false
|
, javaBindings ? false
|
||||||
, ocamlBindings ? false
|
, ocamlBindings ? false
|
||||||
, pythonBindings ? true
|
, pythonBindings ? true
|
||||||
, jdk ? null
|
, jdk ? null
|
||||||
, ocaml ? null, findlib ? null, zarith ? null
|
, ocaml ? null
|
||||||
|
, findlib ? null
|
||||||
|
, zarith ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert javaBindings -> jdk != null;
|
assert javaBindings -> jdk != null;
|
||||||
@ -13,19 +19,19 @@ with lib;
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "z3";
|
pname = "z3";
|
||||||
version = "4.8.9";
|
version = "4.8.10";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Z3Prover";
|
owner = "Z3Prover";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "z3-${version}";
|
rev = "z3-${version}";
|
||||||
sha256 = "1hnbzq10d23drd7ksm3c1n2611c3kd0q0yxgz8y78zaafwczvwxx";
|
sha256 = "1w1ym2l0gipvjx322npw7lhclv8rslq58gnj0d9i96masi3gbycf";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||||
buildInputs = [ python ]
|
buildInputs = [ python ]
|
||||||
++ optional javaBindings jdk
|
++ optional javaBindings jdk
|
||||||
++ optionals ocamlBindings [ ocaml findlib zarith ]
|
++ optionals ocamlBindings [ ocaml findlib zarith ]
|
||||||
;
|
;
|
||||||
propagatedBuildInputs = [ python.pkgs.setuptools ];
|
propagatedBuildInputs = [ python.pkgs.setuptools ];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -35,16 +41,17 @@ stdenv.mkDerivation rec {
|
|||||||
mkdir -p $OCAMLFIND_DESTDIR/stublibs
|
mkdir -p $OCAMLFIND_DESTDIR/stublibs
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = concatStringsSep " " (
|
configurePhase = concatStringsSep " "
|
||||||
[ "${python.interpreter} scripts/mk_make.py --prefix=$out" ]
|
(
|
||||||
++ optional javaBindings "--java"
|
[ "${python.interpreter} scripts/mk_make.py --prefix=$out" ]
|
||||||
++ optional ocamlBindings "--ml"
|
++ optional javaBindings "--java"
|
||||||
++ optional pythonBindings "--python --pypkgdir=$out/${python.sitePackages}"
|
++ optional ocamlBindings "--ml"
|
||||||
) + "\n" + "cd build";
|
++ optional pythonBindings "--python --pypkgdir=$out/${python.sitePackages}"
|
||||||
|
) + "\n" + "cd build";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $dev $lib
|
mkdir -p $dev $lib
|
||||||
mv $out/lib $lib/lib
|
mv $out/lib $lib/lib
|
||||||
mv $out/include $dev/include
|
mv $out/include $dev/include
|
||||||
'' + optionalString pythonBindings ''
|
'' + optionalString pythonBindings ''
|
||||||
mkdir -p $python/lib
|
mkdir -p $python/lib
|
||||||
@ -53,14 +60,13 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ]
|
outputs = [ "out" "lib" "dev" "python" ]
|
||||||
++ optional ocamlBindings "ocaml"
|
++ optional ocamlBindings "ocaml";
|
||||||
;
|
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "A high-performance theorem prover and SMT solver";
|
description = "A high-performance theorem prover and SMT solver";
|
||||||
homepage = "https://github.com/Z3Prover/z3";
|
homepage = "https://github.com/Z3Prover/z3";
|
||||||
license = lib.licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = lib.platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with lib.maintainers; [ thoughtpolice ttuegel ];
|
maintainers = with maintainers; [ thoughtpolice ttuegel ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user