Skip to content

Commit

Permalink
Merge pull request #222227 from Artturin/crossfixes5
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin authored Mar 25, 2023
2 parents ef51ad5 + d3eda58 commit 0fc009e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pkgs/development/tools/analysis/cppcheck/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
, docbook_xsl
, docbook_xml_dtd_45
, which
, pkg-config
}:

stdenv.mkDerivation rec {
Expand All @@ -21,26 +22,32 @@ stdenv.mkDerivation rec {
hash = "sha256-wr2O9EqDvHaMQwnjFLLtP1XxfUwFa/P6gGqYNNPVyaA=";
};

strictDeps = true;
nativeBuildInputs = [ pkg-config installShellFiles libxslt docbook_xsl docbook_xml_dtd_45 which python3 ];
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" ];

outputs = [ "out" "man" ];

enableParallelBuilding = true;

postPatch = ''
substituteInPlace Makefile \
--replace 'PCRE_CONFIG = $(shell which pcre-config)' 'PCRE_CONFIG = $(PKG_CONFIG) libpcre'
'';

postBuild = ''
make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man
'';

# test/testcondition.cpp:4949(TestCondition::alwaysTrueContainer): Assertion failed.
doCheck = !(stdenv.isLinux && stdenv.isAarch64);

postInstall = ''
installManPage cppcheck.1
'';

# test/testcondition.cpp:4949(TestCondition::alwaysTrueContainer): Assertion failed.
doCheck = !(stdenv.isLinux && stdenv.isAarch64);

doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
Expand Down

0 comments on commit 0fc009e

Please sign in to comment.