From dcb886fba70583e7313bfb3c5dcb670ea30ec548 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Wed, 1 Nov 2023 08:06:19 +0100 Subject: [PATCH] terraform-plugin-docs: ensure go is in the PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Philipp Böschen --- pkgs/by-name/te/terraform-plugin-docs/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) 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";