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

32 lines
759 B
Nix
Raw Normal View History

2016-06-07 13:32:34 -07:00
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
2016-06-05 02:16:58 -07:00
2016-06-07 13:32:34 -07:00
buildGoPackage rec {
2016-06-05 02:16:58 -07:00
name = "terraform-${version}";
2016-08-22 07:09:15 -07:00
version = "0.7.1";
2016-06-05 02:16:58 -07:00
rev = "v${version}";
2016-07-13 09:32:13 -07:00
2016-06-05 02:16:58 -07:00
goPackagePath = "github.com/hashicorp/terraform";
src = fetchFromGitHub {
2016-06-05 02:16:58 -07:00
inherit rev;
owner = "hashicorp";
repo = "terraform";
2016-08-22 07:09:15 -07:00
sha256 = "1nvz4nqkn8pl25zyw7x5079dbzmwdxsar9gbcjk1srfpa746j1y4";
2016-06-05 02:16:58 -07:00
};
postInstall = ''
# remove all plugins, they are part of the main binary now
2016-06-05 02:16:58 -07:00
for i in $bin/bin/*; do
2016-08-03 01:51:59 -07:00
if [[ $(basename $i) != terraform ]]; then
rm "$i"
2016-06-05 02:16:58 -07:00
fi
done
'';
2016-08-22 07:22:29 -07:00
meta = with stdenv.lib; {
description = "Tool for building, changing, and versioning infrastructure";
homepage = "https://www.terraform.io/";
license = licenses.mpl20;
};
2016-06-05 02:16:58 -07:00
}