mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 05:31:22 +00:00
75b3e6753e
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
36 lines
980 B
Nix
36 lines
980 B
Nix
{ stdenv, makeWrapper, fetchFromGitHub, gawk }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "lynis";
|
|
version = "2.7.1";
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "CISOfy";
|
|
repo = "${pname}";
|
|
rev = "${version}";
|
|
sha256 = "1nv2dqd2k2n8mcdr6xl5g713xxkgvja6487by1wn4k0b416jij9i";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|