blob: 4e3066fc6ab06893056b1f83f5c6532594197fe8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform, makeWrapper }:
buildGoPackage rec {
pname = "terragrunt";
version = "0.23.2";
goPackagePath = "github.com/gruntwork-io/terragrunt";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = "terragrunt";
rev = "v${version}";
sha256 = "1r3q7faxys0h147cr9154pcix1qgj36v41ja9hhbggm4c7vig4s1";
};
goDeps = ./deps.nix;
buildInputs = [ makeWrapper ];
preBuild = ''
find go/src -name vendor | xargs -I % sh -c 'echo Removing %; rm -rf %'
buildFlagsArray+=("-ldflags" "-X main.VERSION=v${version}")
'';
postInstall = ''
wrapProgram $out/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${lib.getBin terraform.full}/bin/terraform
'';
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 ];
};
}
|