cppcheck: 2.9.3 -> 2.10
Note, the "bug hunting" feature was removed from version 2.10. It is now only available in the "premium" version of cppcheck. See https://github.com/danmar/cppcheck/commit/8f386e15fdedff37486c683d933ccc9a1e307388 We also add a basic installation check to avoid issues in the future.
This commit is contained in:
@@ -1,45 +1,53 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, pcre
|
||||
, python3
|
||||
, libxslt
|
||||
, docbook_xsl
|
||||
, docbook_xml_dtd_45
|
||||
, withZ3 ? true
|
||||
, z3
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cppcheck";
|
||||
version = "2.9.3";
|
||||
version = "2.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "danmar";
|
||||
repo = "cppcheck";
|
||||
rev = version;
|
||||
hash = "sha256-AaZzr5r+tpG5M40HSx45KCUBPhN/nSpXxS5H3FuSx2c=";
|
||||
hash = "sha256-Ss35foFlh4sw6TxMp++0b9E5KDUjBpDPuWIHsak8OGY=";
|
||||
};
|
||||
|
||||
buildInputs = [ pcre
|
||||
(python3.withPackages (ps: [ps.pygments]))
|
||||
] ++ lib.optionals withZ3 [ z3 ];
|
||||
nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 which ];
|
||||
buildInputs = [ pcre (python3.withPackages (ps: [ps.pygments])) ];
|
||||
nativeBuildInputs = [ installShellFiles libxslt docbook_xsl docbook_xml_dtd_45 which ];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" "MATCHCOMPILER=yes" "FILESDIR=$(out)/share/cppcheck" "HAVE_RULES=yes" ]
|
||||
++ lib.optionals withZ3 [ "USE_Z3=yes" "CPPFLAGS=-DNEW_Z3=1" ];
|
||||
makeFlags = [ "PREFIX=$(out)" "MATCHCOMPILER=yes" "FILESDIR=$(out)/share/cppcheck" "HAVE_RULES=yes" ];
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postBuild = ''
|
||||
make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man
|
||||
mkdir -p $man/share/man/man1
|
||||
cp cppcheck.1 $man/share/man/man1/cppcheck.1
|
||||
installManPage cppcheck.1
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
echo 'int main() {}' > ./installcheck.cpp
|
||||
$out/bin/cppcheck ./installcheck.cpp > /dev/null
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user