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}";
|
2017-03-05 01:53:36 +00:00
|
|
|
version = "0.8.8";
|
2016-07-13 17:32:13 +01:00
|
|
|
|
2016-06-05 10:16:58 +01:00
|
|
|
goPackagePath = "github.com/hashicorp/terraform";
|
|
|
|
|
2016-06-06 11:56:28 +01:00
|
|
|
src = fetchFromGitHub {
|
2017-02-16 08:19:41 +00:00
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "terraform";
|
|
|
|
rev = "v${version}";
|
2017-03-05 01:53:36 +00:00
|
|
|
sha256 = "0ibgpcpvz0bmn3cw60nzsabsrxrbmmym1hv7fx6zmjxiwd68w5gb";
|
2016-06-05 10:16:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
2016-08-10 18:01:12 +01:00
|
|
|
# remove all plugins, they are part of the main binary now
|
2016-06-05 10:16:58 +01:00
|
|
|
for i in $bin/bin/*; do
|
2016-08-03 09:51:59 +01:00
|
|
|
if [[ $(basename $i) != terraform ]]; then
|
2016-08-10 18:01:12 +01:00
|
|
|
rm "$i"
|
2016-06-05 10:16:58 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
'';
|
2016-08-22 15:22:29 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Tool for building, changing, and versioning infrastructure";
|
|
|
|
homepage = "https://www.terraform.io/";
|
|
|
|
license = licenses.mpl20;
|
2016-10-26 13:34:19 +01:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
jgeerds
|
|
|
|
zimbatm
|
|
|
|
];
|
2016-08-22 15:22:29 +01:00
|
|
|
};
|
2016-06-05 10:16:58 +01:00
|
|
|
}
|