terraform-backend-git: install shell completions

This commit is contained in:
figsoda
2023-05-02 20:11:40 -04:00
parent e4ad893057
commit 956fad668d
@@ -1,6 +1,7 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
@@ -16,8 +17,19 @@ buildGoModule rec {
vendorHash = "sha256-Y/4UgG/2Vp+gxBnGrNpAgRNfPZWJXhVo8TVa/VfOYt0=";
nativeBuildInputs = [
installShellFiles
];
ldflags = [ "-s" "-w" ];
postInstall = ''
installShellCompletion --cmd terraform-backend-git \
--bash <($out/bin/terraform-backend-git completion bash) \
--fish <($out/bin/terraform-backend-git completion fish) \
--zsh <($out/bin/terraform-backend-git completion zsh)
'';
meta = with lib; {
description = "Terraform HTTP Backend implementation that uses Git repository as storage";
homepage = "https://github.com/plumber-cd/terraform-backend-git";