forked from mirrors/nixpkgs
46420bbaa3
treewide replacement of stdenv.mkDerivation rec { name = "*-${version}"; version = "*"; to pname
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45, pcre }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "cppcheck";
|
|
version = "1.88";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
|
|
sha256 = "1jiqv9pzzy2gxkdhxv3gqjarwgbvc7kxyc66dm3i6xwp94bl89dv";
|
|
};
|
|
|
|
buildInputs = [ pcre ];
|
|
nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ];
|
|
|
|
makeFlags = ''PREFIX=$(out) CFGDIR=$(out)/cfg HAVE_RULES=yes'';
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
postInstall = ''
|
|
make DB2MAN=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl man
|
|
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 = ''
|
|
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 ];
|
|
};
|
|
}
|