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

36 lines
977 B
Nix
Raw Normal View History

{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform-full, makeWrapper }:
2017-01-10 07:27:30 +00:00
buildGoPackage rec {
name = "terragrunt-${version}";
2018-11-10 15:49:56 +00:00
version = "0.17.2";
2017-01-10 07:27:30 +00:00
goPackagePath = "github.com/gruntwork-io/terragrunt";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = "terragrunt";
rev = "v${version}";
2018-11-10 15:49:56 +00:00
sha256 = "069l9ynyl96rfs9zw6w6n1yzjjin27731nj1ajr9jsyc8rhd84wv";
2017-01-10 07:27:30 +00:00
};
goDeps = ./deps.nix;
2017-02-03 02:55:24 +00:00
buildInputs = [ makeWrapper ];
2017-01-10 07:27:30 +00:00
preBuild = ''
buildFlagsArray+=("-ldflags" "-X main.VERSION=v${version}")
'';
2017-01-10 07:27:30 +00:00
postInstall = ''
wrapProgram $bin/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${lib.getBin terraform-full}/bin/terraform
2017-01-10 07:27:30 +00:00
'';
meta = with stdenv.lib; {
description = "A thin wrapper for Terraform that supports locking for Terraform state and enforces best practices.";
homepage = https://github.com/gruntwork-io/terragrunt/;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}