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
zimbatm a4161ac355 terraform: fixes the plugins
The plugins are now part of the binary and cause conflict when available
in the $PATH as well.
2016-08-10 18:01:52 +01:00

26 lines
571 B
Nix

{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "terraform-${version}";
version = "0.7.0";
rev = "v${version}";
goPackagePath = "github.com/hashicorp/terraform";
src = fetchFromGitHub {
inherit rev;
owner = "hashicorp";
repo = "terraform";
sha256 = "0k5d6zph6sq1qg8vi5jmk7apy6v67xn5i7rqjamyr5an7lpxssc9";
};
postInstall = ''
# remove all plugins, they are part of the main binary now
for i in $bin/bin/*; do
if [[ $(basename $i) != terraform ]]; then
rm "$i"
fi
done
'';
}