16 stdenv.mkDerivation (finalAttrs: {
25 src = fetchFromGitHub {
28 rev = finalAttrs.version;
29 hash = "sha256-6AI3sy4D+YhUOpy02UHJWyhelbqcoEW+Tw/ADCPEbuM=";
44 (python3.withPackages (ps: [ ps.pygments ]))
50 "FILESDIR=$(out)/share/cppcheck"
54 enableParallelBuilding = true;
57 # test/testcondition.cpp:4949(TestCondition::alwaysTrueContainer): Assertion failed.
58 doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
59 doInstallCheck = true;
62 substituteInPlace Makefile \
63 --replace 'PCRE_CONFIG = $(shell which pcre-config)' 'PCRE_CONFIG = $(PKG_CONFIG) libpcre'
67 make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man
71 installManPage cppcheck.1
74 installCheckPhase = ''
75 runHook preInstallCheck
77 echo 'int main() {}' > ./installcheck.cpp
78 $out/bin/cppcheck ./installcheck.cpp > /dev/null
80 runHook postInstallCheck
84 description = "Static analysis tool for C/C++ code";
86 Check C/C++ code for memory leaks, mismatching allocation-deallocation,
87 buffer overruns and more.
89 homepage = "http://cppcheck.sourceforge.net";
90 license = lib.licenses.gpl3Plus;
91 maintainers = with lib.maintainers; [
95 platforms = lib.platforms.unix;