2016-06-07 21:32:34 +01:00
|
|
|
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
|
2016-06-05 10:16:58 +01:00
|
|
|
|
2016-06-07 21:32:34 +01:00
|
|
|
buildGoPackage rec {
|
2016-06-05 10:16:58 +01:00
|
|
|
name = "terraform-${version}";
|
|
|
|
version = "0.6.15";
|
|
|
|
rev = "v${version}";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/hashicorp/terraform";
|
|
|
|
|
2016-06-06 11:56:28 +01:00
|
|
|
src = fetchFromGitHub {
|
2016-06-05 10:16:58 +01:00
|
|
|
inherit rev;
|
2016-06-06 11:56:28 +01:00
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "terraform";
|
2016-06-05 10:16:58 +01:00
|
|
|
sha256 = "1mf98hagb0yp40g2mbar7aw7hmpq01clnil6y9khvykrb33vy0nb";
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|