3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/security/lynis/default.nix

35 lines
938 B
Nix
Raw Normal View History

{ stdenv, makeWrapper, fetchFromGitHub, gawk }:
2017-12-07 17:15:50 +00:00
stdenv.mkDerivation rec {
pname = "lynis";
version = "2.7.5";
2017-12-07 17:15:50 +00:00
src = fetchFromGitHub {
owner = "CISOfy";
2019-09-09 00:38:31 +01:00
repo = pname;
rev = version;
sha256 = "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0";
2017-12-07 17:15:50 +00:00
};
nativeBuildInputs = [ makeWrapper ];
2017-12-07 17:15:50 +00:00
postPatch = ''
grep -rl '/usr/local/lynis' ./ | xargs sed -i "s@/usr/local/lynis@$out/share/lynis@g"
'';
installPhase = ''
install -d $out/bin $out/share/lynis/plugins
2017-12-07 17:15:50 +00:00
cp -r include db default.prf $out/share/lynis/
cp -a lynis $out/bin
wrapProgram "$out/bin/lynis" --prefix PATH : ${stdenv.lib.makeBinPath [ gawk ]}
'';
meta = with stdenv.lib; {
description = "Security auditing tool for Linux, macOS, and UNIX-based systems";
homepage = "https://cisofy.com/lynis/";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = [ maintainers.ryneeverett ];
};
}