1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 03:25:02 +00:00

Merge pull request #56095 from asymmetric/solc-z4-opt

solc: make z3 dependency optional
This commit is contained in:
Sarah Brofeldt 2019-02-20 18:45:04 +01:00 committed by GitHub
commit 51005baa3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,8 @@
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, z3 }:
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake
, z3Support ? true, z3 ? null
}:
assert z3Support -> z3 != null;
let
version = "0.5.3";
@ -33,6 +37,8 @@ stdenv.mkDerivation {
cmakeFlags = [
"-DBoost_USE_STATIC_LIBS=OFF"
"-DBUILD_SHARED_LIBS=ON"
] ++ stdenv.lib.optionals (!z3Support) [
"-DUSE_Z3=OFF"
];
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform;
@ -40,7 +46,8 @@ stdenv.mkDerivation {
"./test/soltest -p -- --no-ipc --no-smt --testpath ../test";
nativeBuildInputs = [ cmake ];
buildInputs = [ boost z3 ];
buildInputs = [ boost ]
++ stdenv.lib.optionals z3Support [ z3 ];
outputs = [ "out" "dev" ];