depot/third_party/nixpkgs/pkgs/by-name/hc/hclfmt/package.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

27 lines
764 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "hclfmt";
version = "2.21.0";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "hcl";
rev = "v${version}";
hash = "sha256-izbctn5OqaDunQLovgCGTgqMzC9i227zXlXUNCEExvA=";
};
vendorHash = "sha256-F2i7ph9GL9Xo43da6jHPn9P9FdWC6eSgqCyHPBxdFJY=";
# 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;
mainProgram = "hclfmt";
maintainers = with maintainers; [ zimbatm ];
};
}