2022-08-12 12:06:08 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hclfmt";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.15.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "hcl";
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-bGxgL/Vajy2AtYtSE5/RoURvHHyajpXpR8m7DUeqsks=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
vendorSha256 = "sha256-QZzDFVAmmjkm7n/KpMxDMAjShKiVVGZbZB1W3/TeVjs=";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
# The code repository includes other tools which are not useful. Only build
|
|
|
|
# hclfmt.
|
|
|
|
subPackages = [ "cmd/hclfmt" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "a code formatter for the Hashicorp Configuration Language (HCL) format";
|
|
|
|
homepage = "https://github.com/hashicorp/hcl/tree/main/cmd/hclfmt";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ zimbatm ];
|
|
|
|
};
|
|
|
|
}
|