terraform-plugin-docs: ensure go is in the PATH
Co-authored-by: Philipp Böschen <catouc@philipp.boeschen.me>
This commit is contained in:
parent
3ac3403256
commit
dcb886fba7
1 changed files with 10 additions and 0 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue