biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / cf-terraforming / default.nix
blob5eb7ed9e914c143108666c23f19847577c0f9d58
1 { buildGoModule, fetchFromGitHub, lib, cf-terraforming, testers, installShellFiles, stdenv }:
3 buildGoModule rec {
4   pname = "cf-terraforming";
5   version = "0.21.0";
7   src = fetchFromGitHub {
8     owner = "cloudflare";
9     repo = "cf-terraforming";
10     rev = "v${version}";
11     sha256 = "sha256-fJ3TgdEv9vk5HUUG+0cqYuA4fjXq5Smjf/KAILT9/AU=";
12   };
14   vendorHash = "sha256-NNeJ6QfTV8X3WIFge+Ln38ym9uagLl3IpNWuPqMjeBA=";
15   ldflags = [ "-X github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.versionString=${version}" ];
17   # The test suite insists on downloading a binary release of Terraform from
18   # Hashicorp at runtime, which isn't going to work in a nix build
19   doCheck = false;
21   passthru.tests = testers.testVersion {
22     package = cf-terraforming;
23     command = "cf-terraforming version";
24   };
26   nativeBuildInputs = [ installShellFiles ];
28   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform)''
29     installShellCompletion --cmd cf-terraforming \
30       --bash <($out/bin/cf-terraforming completion bash) \
31       --fish <($out/bin/cf-terraforming completion fish) \
32       --zsh <($out/bin/cf-terraforming completion zsh)
33   '';
35   meta = with lib; {
36     description = "Command line utility to facilitate terraforming your existing Cloudflare resources";
37     homepage = "https://github.com/cloudflare/cf-terraforming/";
38     license = licenses.mpl20;
39     maintainers = with maintainers; [ benley ];
40     mainProgram = "cf-terraforming";
41   };