diff --git a/pkgs/development/tools/analysis/cppcheck/default.nix b/pkgs/development/tools/analysis/cppcheck/default.nix index 76a038ca8199..bdd275a218b8 100644 --- a/pkgs/development/tools/analysis/cppcheck/default.nix +++ b/pkgs/development/tools/analysis/cppcheck/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45, pcre }: +{ stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45, pcre, withZ3 ? true, z3 }: stdenv.mkDerivation rec { pname = "cppcheck"; @@ -9,10 +9,11 @@ stdenv.mkDerivation rec { sha256 = "0gssnb50cndr77xva4nar4a82ii0vfqy96dlm27gb7pd6xmd6xsz"; }; - buildInputs = [ pcre ]; + buildInputs = [ pcre ] ++ stdenv.lib.optionals withZ3 [ z3 ]; nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ]; - makeFlags = [ "PREFIX=$(out)" "FILESDIR=$(out)/cfg" "HAVE_RULES=yes" ]; + makeFlags = [ "PREFIX=$(out)" "FILESDIR=$(out)/cfg" "HAVE_RULES=yes" ] + ++ stdenv.lib.optionals withZ3 [ "USE_Z3=yes" "CPPFLAGS=-DNEW_Z3=1" ]; outputs = [ "out" "man" ];