diff --git a/pkgs/applications/networking/cluster/terraform-docs/default.nix b/pkgs/applications/networking/cluster/terraform-docs/default.nix new file mode 100644 index 000000000000..708b59fce243 --- /dev/null +++ b/pkgs/applications/networking/cluster/terraform-docs/default.nix @@ -0,0 +1,26 @@ +{ lib, buildGoPackage, fetchFromGitHub }: +buildGoPackage rec { + name = "${pname}-${version}"; + pname = "terraform-docs"; + version = "0.5.0"; + + goPackagePath = "github.com/segmentio/${pname}"; + + src = fetchFromGitHub { + owner = "segmentio"; + repo = pname; + rev = "v${version}"; + sha256 = "12w2yr669hk5kxdb9rrzsn8hwvx8rzrc1rmn8hs9l8z1bkfhr4gg"; + }; + + preBuild = '' + buildFlagsArray+=("-ldflags" "-X main.version=${version}") + ''; + + meta = with lib; { + description = "A utility to generate documentation from Terraform modules in various output formats"; + homepage = "https://github.com/segmentio/terraform-docs/"; + license = licenses.mit; + maintainers = with maintainers; [ zimbatm ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e939afa1808a..a0cd819e4c88 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22673,6 +22673,8 @@ in callPackage ../applications/networking/cluster/terraform-providers {} ); + terraform-docs = callPackage ../applications/networking/cluster/terraform-docs {}; + terraform-inventory = callPackage ../applications/networking/cluster/terraform-inventory {}; terraform-landscape = callPackage ../applications/networking/cluster/terraform-landscape {};