Skip to content

Commit

Permalink
terraform-plugin-docs: ensure go is in the PATH
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Böschen <catouc@philipp.boeschen.me>
  • Loading branch information
anthonyroussel and catouc committed Nov 1, 2023
1 parent 3ac3403 commit dcb886f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/by-name/te/terraform-plugin-docs/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, go
, testers
, terraform-plugin-docs
, nix-update-script
Expand All @@ -19,10 +21,14 @@ buildGoModule rec {

vendorHash = "sha256-AjW6BokLVDkIWXToJ7wNq/g19xKTAfpQ/gVlKCV5qw0=";

nativeBuildInputs = [ makeWrapper ];

subPackages = [
"cmd/tfplugindocs"
];

allowGoReference = true;

CGO_ENABLED = 0;

ldflags = [
Expand All @@ -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";
Expand Down

0 comments on commit dcb886f

Please sign in to comment.