Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
63 lines
1.5 KiB
Nix
63 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
go,
|
|
testers,
|
|
terraform-plugin-docs,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "terraform-plugin-docs";
|
|
version = "0.23.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hashicorp";
|
|
repo = "terraform-plugin-docs";
|
|
tag = "v${version}";
|
|
hash = "sha256-SIPGdY8wvM7Lfn0PAqbmk12fhJpq4CA/GYQppTYE8HY=";
|
|
};
|
|
|
|
vendorHash = "sha256-Dqc3B3wfAwX0M6T8TmQU7kjjECHVaK+YmW8H7ZTK+ao=";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
subPackages = [
|
|
"cmd/tfplugindocs"
|
|
];
|
|
|
|
allowGoReference = true;
|
|
|
|
env.CGO_ENABLED = 0;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs/build.version=${version}"
|
|
"-X github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs/build.commit=${src.tag}"
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/tfplugindocs --prefix PATH : ${lib.makeBinPath [ go ]}
|
|
'';
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion {
|
|
command = "tfplugindocs --version";
|
|
package = terraform-plugin-docs;
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Generate and validate Terraform plugin/provider documentation";
|
|
homepage = "https://github.com/hashicorp/terraform-plugin-docs";
|
|
changelog = "https://github.com/hashicorp/terraform-plugin-docs/releases/tag/v${version}";
|
|
license = lib.licenses.mpl20;
|
|
mainProgram = "tfplugindocs";
|
|
maintainers = with lib.maintainers; [ lewo ];
|
|
};
|
|
}
|