2016-06-07 20:32:34 +00:00
|
|
|
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
|
2016-06-05 09:16:58 +00:00
|
|
|
|
2016-06-07 20:32:34 +00:00
|
|
|
buildGoPackage rec {
|
2016-06-05 09:16:58 +00:00
|
|
|
name = "terraform-${version}";
|
2016-10-12 17:51:16 +00:00
|
|
|
version = "0.7.5";
|
2016-06-05 09:16:58 +00:00
|
|
|
rev = "v${version}";
|
2016-07-13 16:32:13 +00:00
|
|
|
|
2016-06-05 09:16:58 +00:00
|
|
|
goPackagePath = "github.com/hashicorp/terraform";
|
|
|
|
|
2016-06-06 10:56:28 +00:00
|
|
|
src = fetchFromGitHub {
|
2016-06-05 09:16:58 +00:00
|
|
|
inherit rev;
|
2016-06-06 10:56:28 +00:00
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "terraform";
|
2016-10-12 17:51:16 +00:00
|
|
|
sha256 = "1s338zhynn8wmhsqhq58njgxv6mwic7d8yxb7zcj2x4b78i7hqa0";
|
2016-06-05 09:16:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
2016-08-10 17:01:12 +00:00
|
|
|
# remove all plugins, they are part of the main binary now
|
2016-06-05 09:16:58 +00:00
|
|
|
for i in $bin/bin/*; do
|
2016-08-03 08:51:59 +00:00
|
|
|
if [[ $(basename $i) != terraform ]]; then
|
2016-08-10 17:01:12 +00:00
|
|
|
rm "$i"
|
2016-06-05 09:16:58 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
'';
|
2016-08-22 14:22:29 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Tool for building, changing, and versioning infrastructure";
|
|
|
|
homepage = "https://www.terraform.io/";
|
|
|
|
license = licenses.mpl20;
|
2016-09-22 19:37:05 +00:00
|
|
|
maintainers = with maintainers; [ zimbatm ];
|
2016-08-22 14:22:29 +00:00
|
|
|
};
|
2016-06-05 09:16:58 +00:00
|
|
|
}
|