nixpkgs/pkgs/applications/science/logic/z3/default.nix
Jörg Thalheim abb0c81190
z3: restrict to x86_64
it uses x86-only header:

include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
src/sat/sat_probing.cpp
make: *** [Makefile:182: util/mpz.o] Error 1
make: *** Waiting for unfinished jobs....
src/sat/sat_parallel.cpp
builder for '/nix/store/vd2wkhic8g77izxv659ackh6hcaamic3-z3-4.8.1.drv' failed with exit code 2
cannot build derivation '/nix/store/h5imnjsf31c45l558gw66vyzb0ickc1m-solc-0.5.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/h5imnjsf31c45l558gw66vyzb0ickc1m-solc-0.5.0.drv' failed
2018-11-15 21:25:53 +00:00

42 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, python, fixDarwinDylibNames }:
stdenv.mkDerivation rec {
name = "z3-${version}";
version = "4.8.1";
src = fetchFromGitHub {
owner = "Z3Prover";
repo = "z3";
rev = name;
sha256 = "1vr57bwx40sd5riijyrhy70i2wnv9xrdihf6y5zdz56yq88rl48f";
};
buildInputs = [ python fixDarwinDylibNames ];
propagatedBuildInputs = [ python.pkgs.setuptools ];
enableParallelBuilding = true;
configurePhase = ''
${python.interpreter} scripts/mk_make.py --prefix=$out --python --pypkgdir=$out/${python.sitePackages}
cd build
'';
postInstall = ''
mkdir -p $dev $lib $python/lib
mv $out/lib/python* $python/lib/
mv $out/lib $lib/lib
mv $out/include $dev/include
ln -sf $lib/lib/libz3${stdenv.hostPlatform.extensions.sharedLibrary} $python/${python.sitePackages}/z3/lib/libz3${stdenv.hostPlatform.extensions.sharedLibrary}
'';
outputs = [ "out" "lib" "dev" "python" ];
meta = {
description = "A high-performance theorem prover and SMT solver";
homepage = "https://github.com/Z3Prover/z3";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.x86_64;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}