lynis: install man page and Bash shell completion

This commit is contained in:
Daniël de Kok 2020-06-27 09:29:45 +02:00
parent c6e52f2fd3
commit 37375dabb3
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, makeWrapper, fetchFromGitHub, gawk }: { stdenv, makeWrapper, fetchFromGitHub, gawk, installShellFiles }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "lynis"; pname = "lynis";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "05p8h2ww4jcc6lgxrm796cbvlfmw26rxq5fmw0xxavbpadiw752j"; sha256 = "05p8h2ww4jcc6lgxrm796cbvlfmw26rxq5fmw0xxavbpadiw752j";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ installShellFiles makeWrapper ];
postPatch = '' postPatch = ''
grep -rl '/usr/local/lynis' ./ | xargs sed -i "s@/usr/local/lynis@$out/share/lynis@g" grep -rl '/usr/local/lynis' ./ | xargs sed -i "s@/usr/local/lynis@$out/share/lynis@g"
@ -22,6 +22,10 @@ stdenv.mkDerivation rec {
cp -r include db default.prf $out/share/lynis/ cp -r include db default.prf $out/share/lynis/
cp -a lynis $out/bin cp -a lynis $out/bin
wrapProgram "$out/bin/lynis" --prefix PATH : ${stdenv.lib.makeBinPath [ gawk ]} wrapProgram "$out/bin/lynis" --prefix PATH : ${stdenv.lib.makeBinPath [ gawk ]}
installManPage lynis.8
installShellCompletion --bash --name lynis.bash \
extras/bash_completion.d/lynis
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {