2018-02-14 11:00:41 +01:00
|
|
|
{ stdenv, fetchFromGitHub, python, fixDarwinDylibNames }:
|
2014-03-08 05:45:15 +01:00
|
|
|
|
2018-02-14 11:00:41 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-03-08 05:45:15 +01:00
|
|
|
name = "z3-${version}";
|
2019-01-08 22:18:29 +01:00
|
|
|
version = "4.8.4";
|
2015-03-27 23:46:35 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Z3Prover";
|
|
|
|
repo = "z3";
|
2018-10-16 17:42:45 +02:00
|
|
|
rev = name;
|
2019-01-08 22:18:29 +01:00
|
|
|
sha256 = "014igqm5vwswz0yhz0cdxsj3a6dh7i79hvhgc3jmmmz3z0xm1gyn";
|
2014-03-08 05:45:15 +01:00
|
|
|
};
|
|
|
|
|
2017-01-03 23:08:14 +01:00
|
|
|
buildInputs = [ python fixDarwinDylibNames ];
|
2018-02-14 11:00:41 +01:00
|
|
|
propagatedBuildInputs = [ python.pkgs.setuptools ];
|
2014-03-08 05:45:15 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-11-08 22:13:56 +01:00
|
|
|
configurePhase = ''
|
|
|
|
${python.interpreter} scripts/mk_make.py --prefix=$out --python --pypkgdir=$out/${python.sitePackages}
|
|
|
|
cd build
|
2014-03-08 05:45:15 +01:00
|
|
|
'';
|
|
|
|
|
2018-07-12 22:01:16 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev $lib $python/lib
|
|
|
|
|
|
|
|
mv $out/lib/python* $python/lib/
|
|
|
|
mv $out/lib $lib/lib
|
|
|
|
mv $out/include $dev/include
|
|
|
|
|
2018-07-14 21:49:47 +02:00
|
|
|
ln -sf $lib/lib/libz3${stdenv.hostPlatform.extensions.sharedLibrary} $python/${python.sitePackages}/z3/lib/libz3${stdenv.hostPlatform.extensions.sharedLibrary}
|
2018-07-12 22:01:16 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "lib" "dev" "python" ];
|
|
|
|
|
2014-03-08 05:45:15 +01:00
|
|
|
meta = {
|
2015-01-23 17:41:55 +01:00
|
|
|
description = "A high-performance theorem prover and SMT solver";
|
2017-08-17 23:53:40 +02:00
|
|
|
homepage = "https://github.com/Z3Prover/z3";
|
2015-03-27 23:46:35 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2018-11-15 22:24:56 +01:00
|
|
|
platforms = stdenv.lib.platforms.x86_64;
|
2014-03-08 05:45:15 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|