1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix

26 lines
595 B
Nix
Raw Normal View History

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}";
2016-07-13 17:32:13 +01:00
version = "0.6.16";
2016-06-05 10:16:58 +01:00
rev = "v${version}";
2016-07-13 17:32:13 +01:00
2016-06-05 10:16:58 +01:00
goPackagePath = "github.com/hashicorp/terraform";
src = fetchFromGitHub {
2016-06-05 10:16:58 +01:00
inherit rev;
owner = "hashicorp";
repo = "terraform";
2016-07-13 17:32:13 +01:00
sha256 = "1bg8hn4b31xphyxrc99bpnf7gmq20fxqx1k871nidx132brcsah2";
2016-06-05 10:16:58 +01: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
'';
}