mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #91659 from danieldk/lynis-shell-files
lynis: install man page and Bash shell completion
This commit is contained in:
commit
1695258f31
@ -1,4 +1,4 @@
|
||||
{ stdenv, makeWrapper, fetchFromGitHub, gawk }:
|
||||
{ stdenv, makeWrapper, fetchFromGitHub, gawk, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lynis";
|
||||
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "05p8h2ww4jcc6lgxrm796cbvlfmw26rxq5fmw0xxavbpadiw752j";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
||||
|
||||
postPatch = ''
|
||||
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 -a lynis $out/bin
|
||||
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; {
|
||||
|
Loading…
Reference in New Issue
Block a user