nixpkgs/pkgs/applications/networking/cluster/terragrunt/default.nix
2023-03-21 06:16:55 +00:00

44 lines
1011 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "terragrunt";
version = "0.45.0";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-SyA1DP9xm8NbgDfGOyzNZwaWq6Wn8IOiiL/m516/cLw=";
};
vendorHash = "sha256-eY9YwXSIOrXbVWUIfVrUIRso1F5weBGKbPFv43k8t2Y=";
doCheck = false;
ldflags = [
"-s"
"-w"
"-X main.VERSION=v${version}"
];
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/terragrunt --help
$out/bin/terragrunt --version | grep "v${version}"
runHook postInstallCheck
'';
meta = with lib; {
homepage = "https://terragrunt.gruntwork.io";
changelog = "https://github.com/gruntwork-io/terragrunt/releases/tag/v${version}";
description = "A thin wrapper for Terraform that supports locking for Terraform state and enforces best practices";
license = licenses.mit;
maintainers = with maintainers; [ jk ];
};
}