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

26 lines
591 B
Nix
Raw Normal View History

2016-06-07 22:32:34 +02:00
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
2016-06-05 11:16:58 +02:00
2016-06-07 22:32:34 +02:00
buildGoPackage rec {
2016-06-05 11:16:58 +02:00
name = "terraform-${version}";
2016-08-03 10:51:59 +02:00
version = "0.7.0";
2016-06-05 11:16:58 +02:00
rev = "v${version}";
2016-07-13 18:32:13 +02:00
2016-06-05 11:16:58 +02:00
goPackagePath = "github.com/hashicorp/terraform";
src = fetchFromGitHub {
2016-06-05 11:16:58 +02:00
inherit rev;
owner = "hashicorp";
repo = "terraform";
2016-08-03 10:51:59 +02:00
sha256 = "0k5d6zph6sq1qg8vi5jmk7apy6v67xn5i7rqjamyr5an7lpxssc9";
2016-06-05 11:16:58 +02:00
};
postInstall = ''
# prefix all the plugins with "terraform-"
for i in $bin/bin/*; do
2016-08-03 10:51:59 +02:00
if [[ $(basename $i) != terraform ]]; then
2016-06-05 11:16:58 +02:00
mv -v $i $bin/bin/terraform-$(basename $i);
fi
done
'';
}