at 22.05-pre 987 B view raw
1{ lib, stdenv, fetchurl, makeWrapper, binutils-unwrapped }: 2 3stdenv.mkDerivation rec { 4 pname = "chkrootkit"; 5 version = "0.55"; 6 7 src = fetchurl { 8 url = "ftp://ftp.pangeia.com.br/pub/seg/pac/${pname}-${version}.tar.gz"; 9 sha256 = "sha256-qBwChuxEkxP5U3ASAqAOgbIE/Cz0PieFhaEcEqXgJYs="; 10 }; 11 12 # TODO: a lazy work-around for linux build failure ... 13 makeFlags = [ "STATIC=" ]; 14 15 nativeBuildInputs = [ makeWrapper ]; 16 17 postPatch = '' 18 substituteInPlace chkrootkit \ 19 --replace " ./" " $out/bin/" 20 ''; 21 22 installPhase = '' 23 mkdir -p $out/sbin 24 cp check_wtmpx chkdirs chklastlog chkproc chkrootkit chkutmp chkwtmp ifpromisc strings-static $out/sbin 25 26 wrapProgram $out/sbin/chkrootkit \ 27 --prefix PATH : "${lib.makeBinPath [ binutils-unwrapped ]}" 28 ''; 29 30 meta = with lib; { 31 description = "Locally checks for signs of a rootkit"; 32 homepage = "http://www.chkrootkit.org/"; 33 license = licenses.bsd2; 34 platforms = with platforms; linux; 35 }; 36}