nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix

26 lines
595 B
Nix
Raw Normal View History

2016-06-07 13:32:34 -07:00
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
2016-06-05 02:16:58 -07:00
2016-06-07 13:32:34 -07:00
buildGoPackage rec {
2016-06-05 02:16:58 -07:00
name = "terraform-${version}";
2016-07-13 09:32:13 -07:00
version = "0.6.16";
2016-06-05 02:16:58 -07:00
rev = "v${version}";
2016-07-13 09:32:13 -07:00
2016-06-05 02:16:58 -07:00
goPackagePath = "github.com/hashicorp/terraform";
src = fetchFromGitHub {
2016-06-05 02:16:58 -07:00
inherit rev;
owner = "hashicorp";
repo = "terraform";
2016-07-13 09:32:13 -07:00
sha256 = "1bg8hn4b31xphyxrc99bpnf7gmq20fxqx1k871nidx132brcsah2";
2016-06-05 02:16:58 -07:00
};
postInstall = ''
# prefix all the plugins with "terraform-"
for i in $bin/bin/*; do
if [[ ! $(basename $i) =~ terraform* ]]; then
mv -v $i $bin/bin/terraform-$(basename $i);
fi
done
'';
}