Merge pull request #118259 from rhoriguchi/chkrootkit

chkrootkit: add missing binutils
This commit is contained in:
Sandro 2021-04-01 19:18:22 +02:00 committed by GitHub
commit 9126104f42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,24 +1,30 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenv, fetchurl, makeWrapper, binutils-unwrapped }:
stdenv.mkDerivation rec {
name = "chkrootkit-0.54";
pname = "chkrootkit";
version = "0.54";
src = fetchurl {
url = "ftp://ftp.pangeia.com.br/pub/seg/pac/${name}.tar.gz";
sha256 = "sha256-FUySaSH1PbYHKKfLyXyohli2lMFLfSiO/jg+CEmRVgc=";
url = "ftp://ftp.pangeia.com.br/pub/seg/pac/${pname}-${version}.tar.gz";
sha256 = "01snj54hhgiqzs72hzabq6abcn46m1yckjx7503vcggm45lr4k0m";
};
# TODO: a lazy work-around for linux build failure ...
makeFlags = [ "STATIC=" ];
postPatch = ''
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
substituteInPlace chkrootkit \
--replace " ./" " $out/bin/"
'';
'';
installPhase = ''
mkdir -p $out/sbin
cp check_wtmpx chkdirs chklastlog chkproc chkrootkit chkutmp chkwtmp ifpromisc strings-static $out/sbin
wrapProgram $out/sbin/chkrootkit \
--prefix PATH : "${lib.makeBinPath [ binutils-unwrapped ]}"
'';
meta = with lib; {