Merge pull request #300772 from maxbrunet/feat/mutagen/completion
mutagen: add shell completions
This commit is contained in:
commit
1ae6aeea7e
1 changed files with 14 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, fetchzip }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, fetchzip, installShellFiles }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "mutagen";
|
||||
|
@ -24,6 +24,8 @@ buildGoModule rec {
|
|||
hash = "sha256-RFB1/gzLjs9w8mebEd4M9Ldv3BrLIj2RsN/QAIJi45E=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
subPackages = [ "cmd/mutagen" "cmd/mutagen-agent" ];
|
||||
|
@ -33,6 +35,17 @@ buildGoModule rec {
|
|||
postInstall = ''
|
||||
install -d $out/libexec
|
||||
ln -s ${agents}/mutagen-agents.tar.gz $out/libexec/
|
||||
|
||||
$out/bin/mutagen generate \
|
||||
--bash-completion-script mutagen.bash \
|
||||
--fish-completion-script mutagen.fish \
|
||||
--zsh-completion-script mutagen.zsh
|
||||
|
||||
installShellCompletion \
|
||||
--cmd mutagen \
|
||||
--bash mutagen.bash \
|
||||
--fish mutagen.fish \
|
||||
--zsh mutagen.zsh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue