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

39 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45 }:
stdenv.mkDerivation rec {
2016-07-17 10:52:13 +01:00
pname = "cppcheck";
2016-10-21 14:56:20 +01:00
version = "1.76.1";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${name}.tar.bz2";
2016-10-21 14:56:20 +01:00
sha256 = "1l46bmzm5syfr9m5l0bqkj8lcyrynhw8gjf95s4fwhp2b7f0zisv";
};
nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ];
makeFlags = ''PREFIX=$(out) CFGDIR=$(out)/cfg'';
2016-04-15 16:18:29 +01:00
outputs = [ "out" "man" ];
2016-10-21 14:56:20 +01:00
enableParallelBuilding = true;
postInstall = ''
make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man
2016-04-15 16:18:29 +01:00
mkdir -p $man/share/man/man1
cp cppcheck.1 $man/share/man/man1/cppcheck.1
'';
meta = with stdenv.lib; {
description = "A static analysis tool for C/C++ code";
longDescription = ''
2016-07-17 10:52:13 +01:00
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; [ joachifm ];
};
}