diff options
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/hclfmt/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/development/tools/hclfmt/default.nix b/pkgs/development/tools/hclfmt/default.nix new file mode 100644 index 0000000000000..2cb25453dbffe --- /dev/null +++ b/pkgs/development/tools/hclfmt/default.nix @@ -0,0 +1,26 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "hclfmt"; + version = "2.12.0"; + + src = fetchFromGitHub { + owner = "hashicorp"; + repo = "hcl"; + rev = "v${version}"; + hash = "sha256-tL0jkddKmfQu3a4BDw/RCwQqhRrPf9XWXHl/nG09yVc="; + }; + + vendorSha256 = "sha256-Wa0tDgHgSPVY6GNxCv9mGWSSi/NuwZq1VO+jwUCMvNI="; + + # 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 ]; + }; +} |