mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 10:23:29 +00:00
spacectl: add shell completions
recommendations Co-authored-by: seth <getchoo@tuta.io> Update pkgs/by-name/sp/spacectl/package.nix Co-authored-by: seth <getchoo@tuta.io> Update pkgs/by-name/sp/spacectl/package.nix Co-authored-by: Bruno BELANYI <bruno@belanyi.fr> nixfmt
This commit is contained in:
parent
29626b8fb4
commit
7a1656b230
@ -1,7 +1,10 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
buildGoModule,
|
buildGoModule,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
installShellFiles,
|
||||||
|
buildPackages,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
@ -17,6 +20,19 @@ buildGoModule rec {
|
|||||||
|
|
||||||
vendorHash = "sha256-SYfXG6YM0Q2rCnoTM2tYvE17uBCD8yQiW/5DTCxMPWo=";
|
vendorHash = "sha256-SYfXG6YM0Q2rCnoTM2tYvE17uBCD8yQiW/5DTCxMPWo=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
postInstall =
|
||||||
|
let
|
||||||
|
emulator = stdenv.hostPlatform.emulator buildPackages;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
installShellCompletion --cmd spacectl \
|
||||||
|
--bash <(${emulator} $out/bin/spacectl completion bash) \
|
||||||
|
--fish <(${emulator} $out/bin/spacectl completion fish) \
|
||||||
|
--zsh <(${emulator} $out/bin/spacectl completion zsh) \
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/spacelift-io/spacectl";
|
homepage = "https://github.com/spacelift-io/spacectl";
|
||||||
description = "Spacelift client and CLI";
|
description = "Spacelift client and CLI";
|
||||||
|
Loading…
Reference in New Issue
Block a user