nixpkgs/pkgs/applications/networking/cluster/terragrunt/default.nix
zimbatm b554d6208a
terraform: add a "full" passthru
providers are already compiled independently so we don't need Hydra to
follow terraform_MAJ_MIN_full to have them all compiled.

Instead of having to create two aliases per release, add a "full"
passthru for that common use-case.

Eg:

  terraform_0_11_full -> terraform_0_11.full
2018-11-20 10:32:36 +01:00

36 lines
972 B
Nix

{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform, makeWrapper }:
buildGoPackage rec {
name = "terragrunt-${version}";
version = "0.17.2";
goPackagePath = "github.com/gruntwork-io/terragrunt";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = "terragrunt";
rev = "v${version}";
sha256 = "069l9ynyl96rfs9zw6w6n1yzjjin27731nj1ajr9jsyc8rhd84wv";
};
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 ];
};
}