nixpkgs/pkgs/applications/networking/cluster/terragrunt/default.nix

36 lines
967 B
Nix
Raw Normal View History

2017-01-10 07:27:30 +00:00
{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform, makeWrapper }:
buildGoPackage rec {
name = "terragrunt-${version}";
2018-02-02 10:32:53 +00:00
version = "0.14.0";
2017-01-10 07:27:30 +00:00
goPackagePath = "github.com/gruntwork-io/terragrunt";
src = fetchFromGitHub {
2017-01-14 05:58:16 +00:00
rev = "v${version}";
2017-01-10 07:27:30 +00:00
owner = "gruntwork-io";
repo = "terragrunt";
2018-02-02 10:32:53 +00:00
sha256 = "1fz4ny7jmwr1xp68bmzlb6achird7jwbb6n6zim6c1w0qybxiqg9";
2017-01-10 07:27:30 +00:00
};
goDeps = ./deps.nix;
2017-02-03 02:55:24 +00:00
buildInputs = [ makeWrapper ];
2017-01-10 07:27:30 +00:00
preBuild = ''
buildFlagsArray+=("-ldflags" "-X main.VERSION=v${version}")
'';
2017-01-10 07:27:30 +00:00
postInstall = ''
wrapProgram $bin/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${lib.getBin terraform}/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.";
homepage = https://github.com/gruntwork-io/terragrunt/;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}