nixpkgs/pkgs/applications/networking/cluster/terragrunt/default.nix
2017-07-31 14:23:04 +08:00

36 lines
968 B
Nix

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