1{ stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45 }:
2
3stdenv.mkDerivation rec {
4 pname = "cppcheck";
5 version = "1.74";
6 name = "${pname}-${version}";
7
8 src = fetchurl {
9 url = "mirror://sourceforge/${pname}/${name}.tar.bz2";
10 sha256 = "0m62byiprabm1m3mc4r2w54p7qyhgi8msipnpm66ychr8rz2yny0";
11 };
12
13 nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ];
14
15 makeFlags = ''PREFIX=$(out) CFGDIR=$(out)/cfg'';
16
17 outputs = [ "out" "man" ];
18
19 postInstall = ''
20 make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man
21 mkdir -p $man/share/man/man1
22 cp cppcheck.1 $man/share/man/man1/cppcheck.1
23 '';
24
25 meta = with stdenv.lib; {
26 description = "A static analysis tool for C/C++ code";
27 longDescription = ''
28 Check C/C++ code for memory leaks, mismatching allocation-deallocation,
29 buffer overruns and more.
30 '';
31 homepage = http://cppcheck.sourceforge.net/;
32 license = licenses.gpl3Plus;
33 platforms = platforms.unix;
34 maintainers = with maintainers; [ joachifm ];
35 };
36}