1{ fetchurl, lib, stdenv, flex }:
2
3stdenv.mkDerivation rec {
4 pname = "splint";
5 version = "3.1.2";
6
7 src = fetchurl {
8 url = "https://www.splint.org/downloads/${pname}-${version}.src.tgz";
9 sha256 = "02pv8kscsrkrzip9r08pfs9xs98q74c52mlxzbii6cv6vx1vd3f7";
10 };
11
12 patches = [ ./tmpdir.patch ] ++ lib.optional stdenv.isDarwin ./darwin.patch;
13
14 buildInputs = [ flex ];
15
16 doCheck = true;
17
18 meta = with lib; {
19 homepage = "http://www.splint.org/";
20 description = "Annotation-assisted lightweight static analyzer for C";
21
22 longDescription = ''
23 Splint is a tool for statically checking C programs for security
24 vulnerabilities and coding mistakes. With minimal effort, Splint
25 can be used as a better lint. If additional effort is invested
26 adding annotations to programs, Splint can perform stronger
27 checking than can be done by any standard lint.
28 '';
29
30 license = licenses.gpl2Plus;
31 platforms = platforms.unix;
32 };
33}