2018-02-14 10:00:41 +00:00
|
|
|
{ stdenv, fetchFromGitHub, python, fixDarwinDylibNames }:
|
2014-03-08 04:45:15 +00:00
|
|
|
|
2018-02-14 10:00:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-01 03:59:36 +01:00
|
|
|
pname = "z3";
|
|
|
|
version = "4.8.5";
|
2015-03-27 22:46:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Z3Prover";
|
2019-06-01 03:59:36 +01:00
|
|
|
repo = pname;
|
|
|
|
rev = "Z3-${version}";
|
|
|
|
sha256 = "11sy98clv7ln0a5vqxzvh6wwqbswsjbik2084hav5kfws4xvklfa";
|
2014-03-08 04:45:15 +00:00
|
|
|
};
|
|
|
|
|
2017-01-03 22:08:14 +00:00
|
|
|
buildInputs = [ python fixDarwinDylibNames ];
|
2018-02-14 10:00:41 +00:00
|
|
|
propagatedBuildInputs = [ python.pkgs.setuptools ];
|
2014-03-08 04:45:15 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-11-08 21:13:56 +00:00
|
|
|
configurePhase = ''
|
|
|
|
${python.interpreter} scripts/mk_make.py --prefix=$out --python --pypkgdir=$out/${python.sitePackages}
|
|
|
|
cd build
|
2014-03-08 04:45:15 +00:00
|
|
|
'';
|
|
|
|
|
2018-07-12 21:01:16 +01: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 20:49:47 +01:00
|
|
|
ln -sf $lib/lib/libz3${stdenv.hostPlatform.extensions.sharedLibrary} $python/${python.sitePackages}/z3/lib/libz3${stdenv.hostPlatform.extensions.sharedLibrary}
|
2018-07-12 21:01:16 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "lib" "dev" "python" ];
|
|
|
|
|
2014-03-08 04:45:15 +00:00
|
|
|
meta = {
|
2015-01-23 16:41:55 +00:00
|
|
|
description = "A high-performance theorem prover and SMT solver";
|
2017-08-17 22:53:40 +01:00
|
|
|
homepage = "https://github.com/Z3Prover/z3";
|
2015-03-27 22:46:35 +00:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2018-11-15 21:24:56 +00:00
|
|
|
platforms = stdenv.lib.platforms.x86_64;
|
2014-03-08 04:45:15 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|