nixpkgs/pkgs/applications/science/logic/z3_opt/default.nix

47 lines
1.5 KiB
Nix
Raw Normal View History

2016-10-18 17:17:12 +02:00
{ stdenv, fetchFromGitHub, python2 }:
2015-05-09 08:45:07 +02:00
# Copied shamelessly from the normal z3 .nix
2016-10-18 17:17:12 +02:00
let
python = python2;
in stdenv.mkDerivation rec {
2015-05-09 08:45:07 +02:00
name = "z3_opt-${version}";
version = "4.3.2";
src = fetchFromGitHub {
owner = "Z3Prover";
repo = "z3";
rev = "9377779e5818b2ca15c4f39921b2ba3a42f948e7";
sha256 = "15d6hsb61hrm5vy3l2gnkrfnqr68lvspnznm17vyhm61ld33yaff";
};
buildInputs = [ python ];
enableParallelBuilding = true;
2016-10-18 17:17:12 +02:00
configurePhase = "${python.interpreter} scripts/mk_make.py --prefix=$out && cd build";
2015-05-09 08:45:07 +02:00
# z3's install phase is stupid because it tries to calculate the
# python package store location itself, meaning it'll attempt to
# write files into the nix store, and fail.
soext = if stdenv.system == "x86_64-darwin" then ".dylib" else ".so";
installPhase = ''
2016-10-18 17:17:12 +02:00
mkdir -p $out/bin $out/${python.sitePackages} $out/include
2015-05-09 08:45:07 +02:00
cp ../src/api/z3*.h $out/include
cp ../src/api/c++/z3*.h $out/include
cp z3 $out/bin
cp libz3${soext} $out/lib
2016-10-18 17:17:12 +02:00
cp libz3${soext} $out/${python.sitePackages}
cp z3*.pyc $out/${python.sitePackages}
cp ../src/api/python/*.py $out/${python.sitePackages}
2015-05-09 08:45:07 +02:00
'';
meta = {
description = "A high-performance theorem prover and SMT solver, optimization edition";
homepage = "http://github.com/Z3Prover/z3";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice sheganinans ];
};
}