Merge pull request #229568 from figsoda/tf

This commit is contained in:
figsoda 2023-05-09 11:17:43 -04:00 committed by GitHub
commit 3e09faf615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
@ -16,7 +17,22 @@ buildGoModule rec {
vendorHash = "sha256-Y/4UgG/2Vp+gxBnGrNpAgRNfPZWJXhVo8TVa/VfOYt0=";
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [
installShellFiles
];
ldflags = [
"-s"
"-w"
"-X=github.com/plumber-cd/terraform-backend-git/cmd.Version=${version}"
];
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";