12 pname = "cf-terraforming";
15 src = fetchFromGitHub {
17 repo = "cf-terraforming";
19 sha256 = "sha256-y98UXRC8pyCIhCUHh9vqxXkN+HDwSTfplOAJZwKnIxw=";
22 vendorHash = "sha256-tSN+ExQeDlaw8kTnDGIGbdAoX5wCPhp9MgYi2Z8fGvc=";
24 "-X github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.versionString=${version}"
27 # The test suite insists on downloading a binary release of Terraform from
28 # Hashicorp at runtime, which isn't going to work in a nix build
31 passthru.tests = testers.testVersion {
32 package = cf-terraforming;
33 command = "cf-terraforming version";
36 nativeBuildInputs = [ installShellFiles ];
38 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
39 installShellCompletion --cmd cf-terraforming \
40 --bash <($out/bin/cf-terraforming completion bash) \
41 --fish <($out/bin/cf-terraforming completion fish) \
42 --zsh <($out/bin/cf-terraforming completion zsh)
46 description = "Command line utility to facilitate terraforming your existing Cloudflare resources";
47 homepage = "https://github.com/cloudflare/cf-terraforming/";
48 license = licenses.mpl20;
49 maintainers = with maintainers; [ benley ];
50 mainProgram = "cf-terraforming";