diff --git a/pkgs/by-name/te/terraform-plugin-docs/package.nix b/pkgs/by-name/te/terraform-plugin-docs/package.nix index 9f3af301c338..de64c81093c5 100644 --- a/pkgs/by-name/te/terraform-plugin-docs/package.nix +++ b/pkgs/by-name/te/terraform-plugin-docs/package.nix @@ -1,6 +1,8 @@ { lib , buildGoModule , fetchFromGitHub +, makeWrapper +, go , testers , terraform-plugin-docs , nix-update-script @@ -19,10 +21,14 @@ buildGoModule rec { vendorHash = "sha256-AjW6BokLVDkIWXToJ7wNq/g19xKTAfpQ/gVlKCV5qw0="; + nativeBuildInputs = [ makeWrapper ]; + subPackages = [ "cmd/tfplugindocs" ]; + allowGoReference = true; + CGO_ENABLED = 0; ldflags = [ @@ -32,6 +38,10 @@ buildGoModule rec { "-X main.commit=${src.rev}" ]; + postInstall = '' + wrapProgram $out/bin/tfplugindocs --prefix PATH : ${lib.makeBinPath [ go ]} + ''; + passthru = { tests.version = testers.testVersion { command = "tfplugindocs --version";