mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
a4161ac355
The plugins are now part of the binary and cause conflict when available in the $PATH as well.
26 lines
571 B
Nix
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
|
|
'';
|
|
}
|