about summary refs log tree commit diff
path: root/pkgs/by-name/te
diff options
context:
space:
mode:
authorAnthony Roussel <anthony@roussel.dev>2023-11-01 08:06:19 +0100
committerAnthony Roussel <anthony@roussel.dev>2023-11-01 08:21:17 +0100
commitdcb886fba70583e7313bfb3c5dcb670ea30ec548 (patch)
treeb284d98e20407d20c91409f15bbcd9a6562da685 /pkgs/by-name/te
parent3ac34032569468f3abd21b31ad53722dbbb843ba (diff)
terraform-plugin-docs: ensure go is in the PATH
Co-authored-by: Philipp Böschen <catouc@philipp.boeschen.me>
Diffstat (limited to 'pkgs/by-name/te')
-rw-r--r--pkgs/by-name/te/terraform-plugin-docs/package.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/by-name/te/terraform-plugin-docs/package.nix b/pkgs/by-name/te/terraform-plugin-docs/package.nix
index 9f3af301c3381..de64c81093c55 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";