2020-05-06 13:05:10 +01:00
|
|
|
{ stdenv, lib, buildGoModule, fetchFromGitHub, terraform, makeWrapper }:
|
2017-01-10 07:27:30 +00:00
|
|
|
|
2020-05-06 13:05:10 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "terragrunt";
|
2020-09-07 01:47:22 +01:00
|
|
|
version = "0.23.40";
|
2017-01-10 07:27:30 +00:00
|
|
|
|
2020-05-06 13:05:10 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gruntwork-io";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-09-07 01:47:22 +01:00
|
|
|
sha256 = "0gd2g1nl8dgj24mzk4qymcwnp6prbi3qxj863rkpi3k32zy2iw4k";
|
2017-01-10 07:27:30 +00:00
|
|
|
};
|
|
|
|
|
2020-09-07 01:47:22 +01:00
|
|
|
vendorSha256 = "0f466qn5vp74mwx9s4rcbw1x793w8hr5dcf2c12sgshya1bxs4nl";
|
2017-01-10 07:27:30 +00:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2017-02-03 02:55:24 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
2017-01-10 07:27:30 +00:00
|
|
|
|
2017-03-15 15:01:09 +00:00
|
|
|
preBuild = ''
|
|
|
|
buildFlagsArray+=("-ldflags" "-X main.VERSION=v${version}")
|
|
|
|
'';
|
|
|
|
|
2017-01-10 07:27:30 +00:00
|
|
|
postInstall = ''
|
2020-04-28 02:50:57 +01:00
|
|
|
wrapProgram $out/bin/terragrunt \
|
2018-11-19 20:03:44 +00:00
|
|
|
--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.";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/gruntwork-io/terragrunt/";
|
2017-01-10 07:27:30 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
2020-07-31 04:58:04 +01:00
|
|
|
}
|