mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
36 lines
972 B
Nix
36 lines
972 B
Nix
{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform, makeWrapper }:
|
|
|
|
buildGoPackage rec {
|
|
name = "terragrunt-${version}";
|
|
version = "0.17.4";
|
|
|
|
goPackagePath = "github.com/gruntwork-io/terragrunt";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gruntwork-io";
|
|
repo = "terragrunt";
|
|
rev = "v${version}";
|
|
sha256 = "13hlv0ydmv8gpzgg6bfr7rp89xfw1bkgd0j684armw8zq29cmv3a";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|