{ buildGoModule, lib, fetchFromGitHub, }: buildGoModule rec { pname = "tfswitch"; version = "1.7.0"; src = fetchFromGitHub { owner = "warrensbox"; repo = "terraform-switcher"; rev = "v${version}"; sha256 = "sha256-Lxczo2zlBqDyHAcGPR1UM1s8tR4+F80YeNI0JJXLN30="; }; vendorHash = "sha256-JnfRdircsabRP1O8dSs8/OGwTSvv4xmIXeFQsnbpb5o="; # Disable tests since it requires network access and relies on the # presence of release.hashicorp.com doCheck = false; postInstall = '' # The binary is named tfswitch mv $out/bin/terraform-switcher $out/bin/tfswitch ''; meta = with lib; { description = "Command line tool to switch between different versions of terraform"; mainProgram = "tfswitch"; homepage = "https://github.com/warrensbox/terraform-switcher"; license = licenses.mit; maintainers = with maintainers; [ psibi ]; }; }