1{ stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 name = "chkrootkit-0.52";
5
6 src = fetchurl {
7 url = "ftp://ftp.pangeia.com.br/pub/seg/pac/${name}.tar.gz";
8 sha256 = "04d2yxpy99y90rvrlc9fqmlffs6iyfbghxbhvv12j1xfr2ww0y65";
9 };
10
11 # TODO: a lazy work-around for linux build failure ...
12 makeFlags = [ "STATIC=" ];
13
14 postPatch = ''
15 substituteInPlace chkrootkit \
16 --replace " ./" " $out/bin/"
17 '';
18
19 installPhase = ''
20 mkdir -p $out/sbin
21 cp check_wtmpx chkdirs chklastlog chkproc chkrootkit chkutmp chkwtmp ifpromisc strings-static $out/sbin
22 '';
23
24 meta = with stdenv.lib; {
25 description = "Locally checks for signs of a rootkit";
26 homepage = http://www.chkrootkit.org/;
27 license = licenses.bsd2;
28 platforms = with platforms; linux;
29 };
30}