2022-07-25 18:15:58 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hclfmt";
|
2024-08-26 13:03:28 +00:00
|
|
|
version = "2.22.0";
|
2022-07-25 18:15:58 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "hcl";
|
|
|
|
rev = "v${version}";
|
2024-08-26 13:03:28 +00:00
|
|
|
hash = "sha256-jIW2r8RWNbk4maWKeUSe1Kqll5jJYe72UCP2EEGfRYg=";
|
2022-07-25 18:15:58 +00:00
|
|
|
};
|
|
|
|
|
2024-06-19 18:55:55 +00:00
|
|
|
vendorHash = "sha256-F2i7ph9GL9Xo43da6jHPn9P9FdWC6eSgqCyHPBxdFJY=";
|
2022-07-25 18:15:58 +00:00
|
|
|
|
|
|
|
# The code repository includes other tools which are not useful. Only build
|
|
|
|
# hclfmt.
|
|
|
|
subPackages = [ "cmd/hclfmt" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Code formatter for the Hashicorp Configuration Language (HCL) format";
|
|
|
|
homepage = "https://github.com/hashicorp/hcl/tree/main/cmd/hclfmt";
|
|
|
|
license = licenses.mpl20;
|
2023-08-05 01:57:13 +00:00
|
|
|
mainProgram = "hclfmt";
|
2022-07-25 18:15:58 +00:00
|
|
|
maintainers = with maintainers; [ zimbatm ];
|
|
|
|
};
|
|
|
|
}
|