1{ fetchurl, stdenv, flex }:
2
3stdenv.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 ] ++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
12
13 buildInputs = [ flex ];
14
15 doCheck = true;
16
17 meta = with stdenv.lib; {
18 homepage = "http://www.splint.org/";
19 description = "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 = licenses.gpl2Plus;
30 platforms = platforms.unix;
31 };
32}