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
This commit is contained in:
parent
59f18fbf36
commit
b5179c6d1a
@ -1,29 +1,26 @@
|
||||
{ stdenv, makeWrapper, fetchFromGitHub, gawk, perl }:
|
||||
{ stdenv, makeWrapper, fetchFromGitHub, gawk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lynis";
|
||||
version = "2.6.9";
|
||||
version = "2.7.0";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "CISOfy";
|
||||
repo = "${pname}";
|
||||
rev = "${version}";
|
||||
sha256 = "125p5vpc2ksn0nab8y4ckfgx13rlv3w95amgighiqkh15ccji5kq";
|
||||
sha256 = "0rzc0y8lk22bymf56249jzmllki2lh0rz5in4lkrc5fkmp29c2wv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper perl ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postPatch = ''
|
||||
grep -rl '/usr/local/lynis' ./ | xargs sed -i "s@/usr/local/lynis@$out/share/lynis@g"
|
||||
# Don't use predefined binary paths. See https://github.com/CISOfy/lynis/issues/468
|
||||
perl -i -p0e 's/BIN_PATHS="[^"]*"/BIN_PATHS=\$\(echo \$PATH\ | sed "s\/:\/ \/g")/sm;' include/consts
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/lynis
|
||||
install -d $out/bin $out/share/lynis/plugins
|
||||
cp -r include db default.prf $out/share/lynis/
|
||||
mkdir -p $out/bin
|
||||
cp -a lynis $out/bin
|
||||
wrapProgram "$out/bin/lynis" --prefix PATH : ${stdenv.lib.makeBinPath [ gawk ]}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user