nixpkgs/pkgs/applications/networking/cluster/terragrunt/default.nix
Peter Hoeg fb6177722d terragrunt: 0.14.0 -> 0.14.2
Also pull in terraform-full as we need the plugins to actually do something.
2018-03-07 14:21:40 +08:00

36 lines
977 B
Nix

{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform-full, makeWrapper }:
buildGoPackage rec {
name = "terragrunt-${version}";
version = "0.14.2";
goPackagePath = "github.com/gruntwork-io/terragrunt";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = "terragrunt";
rev = "v${version}";
sha256 = "0bnscp0sjnzhnqbm7m5ip6g2608yfvsnr60f03y2qqld8m9wmj32";
};
goDeps = ./deps.nix;
buildInputs = [ makeWrapper ];
preBuild = ''
buildFlagsArray+=("-ldflags" "-X main.VERSION=v${version}")
'';
postInstall = ''
wrapProgram $bin/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 ];
};
}