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