@@ -0,0 +1,31 @@
1+{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform, makeWrapper }:
2+
3+buildGoPackage rec {
4+ name = "terragrunt-${version}";
5+ version = "0.9.8";
6+
7+ goPackagePath = "github.com/gruntwork-io/terragrunt";
8+
9+ src = fetchFromGitHub {
10+ rev = "v${version}";
11+ owner = "gruntwork-io";
12+ repo = "terragrunt";
13+ sha256 = "0aakr17yzh5jzvlmg3pzpnsfwl31njg27bpck541492shqcqmkiz";
14+ };
15+
16+ goDeps = ./deps.nix;
17+
18+ buildInputs = [ makeWrapper ];
19+
20+ postInstall = ''
21+ wrapProgram $bin/bin/terragrunt \
22+ --set TERRAGRUNT_TFPATH ${lib.getBin terraform}/bin/terraform
23+ '';
24+
25+ meta = with stdenv.lib; {
26+ description = "A thin wrapper for Terraform that supports locking for Terraform state and enforces best practices.";
27+ homepage = https://github.com/gruntwork-io/terragrunt/;
28+ license = licenses.mit;
29+ maintainers = with maintainers; [ peterhoeg ];
30+ };
31+}