nixpkgs/pkgs/development/tools/analysis/cppcheck/default.nix

37 lines
1.0 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45 }:
let
pname = "cppcheck";
version = "1.72";
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${name}.tar.bz2";
sha256 = "085lm8v7biixy6rykq836gfy91jcccpz9qpk8i9x339dzy2b2q4l";
};
nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ];
makeFlags = ''PREFIX=$(out) CFGDIR=$(out)/cfg'';
postInstall = ''
make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man
mkdir -p $out/share/man/man1
cp cppcheck.1 $out/share/man/man1/cppcheck.1
'';
meta = with stdenv.lib; {
description = "A static analysis tool for C/C++ code";
longDescription = ''
Check C/C++ code for memory leaks, mismatching
allocation-deallocation, buffer overruns and more.
'';
homepage = http://cppcheck.sourceforge.net/;
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ simons joachifm ];
};
}