gops: install shell completions
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
buildGoModule,
|
buildGoModule,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
writableTmpDirAsHomeHook,
|
writableTmpDirAsHomeHook,
|
||||||
|
installShellFiles,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule (finalAttrs: {
|
buildGoModule (finalAttrs: {
|
||||||
@@ -20,6 +22,16 @@ buildGoModule (finalAttrs: {
|
|||||||
|
|
||||||
nativeCheckInputs = [ writableTmpDirAsHomeHook ];
|
nativeCheckInputs = [ writableTmpDirAsHomeHook ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||||
|
installShellCompletion \
|
||||||
|
--cmd gops \
|
||||||
|
--bash <($out/bin/gops completion bash) \
|
||||||
|
--fish <($out/bin/gops completion fish) \
|
||||||
|
--zsh <($out/bin/gops completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Tool to list and diagnose Go processes currently running on your system";
|
description = "Tool to list and diagnose Go processes currently running on your system";
|
||||||
mainProgram = "gops";
|
mainProgram = "gops";
|
||||||
|
|||||||
Reference in New Issue
Block a user