Merge pull request #152567 from LeSuisse/rekor-shell-completions
rekor-cli, rekor-server: install shell completions
This commit is contained in:
commit
21466e63cc
@ -1,4 +1,4 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
|
||||
let
|
||||
generic = { pname, packageToBuild, description }:
|
||||
@ -15,10 +15,19 @@ let
|
||||
|
||||
vendorSha256 = "sha256-XCCO4Vamzj5pJFmu1A8mpTLlVAtocrn20myYJVWtBrY=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
subPackages = [ packageToBuild ];
|
||||
|
||||
ldflags = [ "-s" "-w" "-X github.com/sigstore/rekor/${packageToBuild}/app.GitVersion=v${version}" ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd ${pname} \
|
||||
--bash <($out/bin/${pname} completion bash) \
|
||||
--fish <($out/bin/${pname} completion fish) \
|
||||
--zsh <($out/bin/${pname} completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
inherit description;
|
||||
homepage = "https://github.com/sigstore/rekor";
|
||||
|
Loading…
Reference in New Issue
Block a user