nixpkgs/pkgs/tools/security/lynis/default.nix
R. RyanTM b5179c6d1a lynis: 2.6.9 -> 2.7.0 (#50045)
* lynis: 2.6.9 -> 2.7.0

Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/lynis/versions

* lynis: remove perl and create plugins subdir
2018-11-10 14:48:26 +01:00

36 lines
980 B
Nix

{ stdenv, makeWrapper, fetchFromGitHub, gawk }:
stdenv.mkDerivation rec {
pname = "lynis";
version = "2.7.0";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "CISOfy";
repo = "${pname}";
rev = "${version}";
sha256 = "0rzc0y8lk22bymf56249jzmllki2lh0rz5in4lkrc5fkmp29c2wv";
};
nativeBuildInputs = [ makeWrapper ];
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
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 ];
};
}