Skip to content

Commit

Permalink
Merge pull request #152567 from LeSuisse/rekor-shell-completions
Browse files Browse the repository at this point in the history
rekor-cli, rekor-server: install shell completions
  • Loading branch information
bobby285271 authored Dec 29, 2021
2 parents 93de158 + 24612ec commit 21466e6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkgs/tools/security/rekor/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:

let
generic = { pname, packageToBuild, description }:
Expand All @@ -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";
Expand Down

0 comments on commit 21466e6

Please sign in to comment.