lol

Add Splint, a static code analyzer for C.

svn path=/nixpkgs/trunk/; revision=12343

+51
+31
pkgs/development/tools/analysis/splint/default.nix
···
··· 1 + { fetchurl, stdenv, flex }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "splint-3.1.2"; 5 + 6 + src = fetchurl { 7 + url = "http://www.splint.org/downloads/${name}.src.tgz"; 8 + sha256 = "02pv8kscsrkrzip9r08pfs9xs98q74c52mlxzbii6cv6vx1vd3f7"; 9 + }; 10 + 11 + patches = [ ./tmpdir.patch ]; 12 + 13 + buildInputs = [ flex ]; 14 + 15 + doCheck = true; 16 + 17 + meta = { 18 + homepage = http://splint.org/; 19 + description = "Splint, an annotation-assisted lightweight static analyzer for C"; 20 + 21 + longDescription = '' 22 + Splint is a tool for statically checking C programs for security 23 + vulnerabilities and coding mistakes. With minimal effort, Splint 24 + can be used as a better lint. If additional effort is invested 25 + adding annotations to programs, Splint can perform stronger 26 + checking than can be done by any standard lint. 27 + ''; 28 + 29 + license = "GPLv2+"; 30 + }; 31 + }
+16
pkgs/development/tools/analysis/splint/tmpdir.patch
···
··· 1 + Have Splint honor $TMPDIR. 2 + 3 + --- splint-3.1.2/src/context.c 2004-07-31 21:04:26.000000000 +0200 4 + +++ splint-3.1.2/src/context.c 2008-07-11 10:55:16.000000000 +0200 5 + @@ -801,7 +801,10 @@ context_resetAllFlags (void) 6 + val = cstring_makeLiteral (env != NULL ? env : DEFAULT_TMPDIR); 7 + } 8 + # else 9 + - val = cstring_makeLiteral (DEFAULT_TMPDIR); 10 + + { 11 + + char *env = getenv ("TMPDIR"); 12 + + val = cstring_makeLiteral (env != NULL ? env : DEFAULT_TMPDIR); 13 + + } 14 + # endif /* !defined(OS2) && !defined(MSDOS) */ 15 + 16 + break;
+4
pkgs/top-level/all-packages.nix
··· 2252 stdenv = overrideInStdenv stdenv [gnumake380]; 2253 }; 2254 2255 strace = import ../development/tools/misc/strace { 2256 inherit fetchurl stdenv; 2257 };
··· 2252 stdenv = overrideInStdenv stdenv [gnumake380]; 2253 }; 2254 2255 + splint = import ../development/tools/analysis/splint { 2256 + inherit fetchurl stdenv flex; 2257 + }; 2258 + 2259 strace = import ../development/tools/misc/strace { 2260 inherit fetchurl stdenv; 2261 };