1 { lib, stdenv, makeWrapper, fetchFromGitHub, gawk, installShellFiles }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-fPQX/Iz+dc3nF3xMPt0bek4JC2XSHe4aC4O0tZwLf6Y=";
14 nativeBuildInputs = [ installShellFiles makeWrapper ];
17 grep -rl '/usr/local/lynis' ./ | xargs sed -i "s@/usr/local/lynis@$out/share/lynis@g"
21 install -d $out/bin $out/share/lynis/plugins
22 cp -r include db default.prf $out/share/lynis/
24 wrapProgram "$out/bin/lynis" --prefix PATH : ${lib.makeBinPath [ gawk ]}
26 installManPage lynis.8
27 installShellCompletion --bash --name lynis.bash \
28 extras/bash_completion.d/lynis
32 description = "Security auditing tool for Linux, macOS, and UNIX-based systems";
33 homepage = "https://cisofy.com/lynis/";
34 license = licenses.gpl3Only;
35 platforms = platforms.unix;
36 maintainers = [ maintainers.ryneeverett ];