From eb5ea1500b4e8a1e9ca6d62b69d6835f80efe3b7 Mon Sep 17 00:00:00 2001 From: Jonas Chevalier Date: Mon, 25 Jul 2022 20:15:58 +0200 Subject: [PATCH] hclfmt: init at 2.12.0 (#182472) * hclfmt: init at 2.12.0 Co-authored-by: Winter --- pkgs/development/tools/hclfmt/default.nix | 26 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/tools/hclfmt/default.nix diff --git a/pkgs/development/tools/hclfmt/default.nix b/pkgs/development/tools/hclfmt/default.nix new file mode 100644 index 000000000000..2cb25453dbff --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b84df60d9a57..45f27c13f7f6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16082,6 +16082,8 @@ with pkgs; hcloud = callPackage ../development/tools/hcloud { }; + hclfmt = callPackage ../development/tools/hclfmt { }; + help2man = callPackage ../development/tools/misc/help2man { }; heroku = callPackage ../development/tools/heroku { };