Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 name = "chkrootkit-0.53";
5
6 src = fetchurl {
7 url = "ftp://ftp.pangeia.com.br/pub/seg/pac/${name}.tar.gz";
8 sha256 = "1da5ry3p7jb6xs6xlfml1ly09q2rs5q6n5axif17d29k7gixlqkj";
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}