From 589c764e8e3437977beccd3d167eb1a1ce3f78d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Wed, 23 Mar 2022 11:11:18 +0100 Subject: [PATCH 1/3] cppcheck: fix cppcheck-htmlreport By adding python3 with pygments to buildInputs. --- pkgs/development/tools/analysis/cppcheck/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/cppcheck/default.nix b/pkgs/development/tools/analysis/cppcheck/default.nix index 7f9e82162ea4..77cb2ba1aca3 100644 --- a/pkgs/development/tools/analysis/cppcheck/default.nix +++ b/pkgs/development/tools/analysis/cppcheck/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45, pcre, withZ3 ? true, z3 }: +{ lib, stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45, pcre, withZ3 ? true, z3, python3 }: stdenv.mkDerivation rec { pname = "cppcheck"; @@ -9,7 +9,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-rHTAlzxGoFJ2D0/3ymqEYWyleVUQVC0ZWm8SLFMHkpE="; }; - buildInputs = [ pcre ] ++ lib.optionals withZ3 [ z3 ]; + buildInputs = [ pcre + (python3.withPackages (ps: [ps.pygments])) + ] ++ lib.optionals withZ3 [ z3 ]; nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ]; makeFlags = [ "PREFIX=$(out)" "FILESDIR=$(out)/cfg" "HAVE_RULES=yes" ] From 494ce6bbcb4b811bf76cec0fb96c76cc4cef1792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Wed, 23 Mar 2022 10:38:45 +0100 Subject: [PATCH 2/3] cppcheck: 2.7 -> 2.7.3 And switch from sourceforge to github, as upstream hasn't updated the sourceforge pages yet. (I checked the download links on the sourceforge page and they link to https://github.com/danmar/cppcheck, so that should be fine.) --- pkgs/development/tools/analysis/cppcheck/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/analysis/cppcheck/default.nix b/pkgs/development/tools/analysis/cppcheck/default.nix index 77cb2ba1aca3..302b7ae3bbfe 100644 --- a/pkgs/development/tools/analysis/cppcheck/default.nix +++ b/pkgs/development/tools/analysis/cppcheck/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45, pcre, withZ3 ? true, z3, python3 }: +{ lib, stdenv, fetchFromGitHub, libxslt, docbook_xsl, docbook_xml_dtd_45, pcre, withZ3 ? true, z3, python3 }: stdenv.mkDerivation rec { pname = "cppcheck"; - version = "2.7"; + version = "2.7.3"; - src = fetchurl { - url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; - sha256 = "sha256-rHTAlzxGoFJ2D0/3ymqEYWyleVUQVC0ZWm8SLFMHkpE="; + src = fetchFromGitHub { + owner = "danmar"; + repo = "cppcheck"; + rev = version; + sha256 = "0bwk89nkq67nphplb24daxvg75pv9bgh0kcqr2samhpzmjpvzxm5"; }; buildInputs = [ pcre From 45ab96dd9c1b04a662bc7a8f7b9ff71cbc5e190a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 26 Mar 2022 16:43:27 +0100 Subject: [PATCH 3/3] cppcheck: set doCheck = true --- pkgs/development/tools/analysis/cppcheck/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/tools/analysis/cppcheck/default.nix b/pkgs/development/tools/analysis/cppcheck/default.nix index 302b7ae3bbfe..372e6dee806d 100644 --- a/pkgs/development/tools/analysis/cppcheck/default.nix +++ b/pkgs/development/tools/analysis/cppcheck/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + doCheck = true; + postInstall = '' make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man mkdir -p $man/share/man/man1