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:
commit
51005baa3a
|
@ -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" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue