depot/pkgs/by-name/tf/tfswitch/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
898 B
Nix
Raw Normal View History

{ buildGoModule, lib, fetchFromGitHub }:
buildGoModule rec {
pname = "tfswitch";
version = "1.2.3";
src = fetchFromGitHub {
owner = "warrensbox";
repo = "terraform-switcher";
rev = "v${version}";
sha256 = "sha256-Eb1pniSppowyQsLkCbbNlWtMCrDu4URqKXHnVFbA5lE=";
};
vendorHash = "sha256-KQfsWbWwxznGkJB/KA/OkG8r8FnfsoSL90+mFUN9454=";
# 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 =
"A 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 ];
};
}