btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / tf / tf-summarize / package.nix
blob9912edb0acdf6d4963bd6fba46fb51b99dfc4eb4
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , testers
5 , tf-summarize
6 }:
8 buildGoModule rec {
9   pname = "tf-summarize";
10   version = "0.3.11";
12   src = fetchFromGitHub {
13     owner = "dineshba";
14     repo = "tf-summarize";
15     rev = "v${version}";
16     hash = "sha256-HXmFxbYfzEp6hxdmvNcSI+8zM3wh7pVpFjquwP/t4PU=";
17   };
19   vendorHash = "sha256-nfontEgMj2qPbrM35iR7b65qrkWHCMY1v944iYdNLG8=";
21   ldflags = [
22     "-s"
23     "-w"
24     "-X main.version=${version}"
25   ];
27   passthru.tests.version = testers.testVersion {
28     package = tf-summarize;
29     command = "tf-summarize -v";
30     inherit version;
31   };
33   meta = with lib; {
34     description = "Command-line utility to print the summary of the terraform plan";
35     mainProgram = "tf-summarize";
36     homepage = "https://github.com/dineshba/tf-summarize";
37     license = licenses.mit;
38     maintainers = with maintainers; [ pjrm ];
39   };