Skip to content

Commit

Permalink
Merge pull request #264756 from anthonyroussel/rename/terraform-plugi…
Browse files Browse the repository at this point in the history
…n-docs

terraform-plugin-docs: rename from tfplugindocs
  • Loading branch information
nlewo authored Nov 1, 2023
2 parents b01b09e + dcb886f commit d9493be
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 24 deletions.
61 changes: 61 additions & 0 deletions pkgs/by-name/te/terraform-plugin-docs/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, go
, testers
, terraform-plugin-docs
, nix-update-script
}:

buildGoModule rec {
pname = "terraform-plugin-docs";
version = "0.16.0";

src = fetchFromGitHub {
owner = "hashicorp";
repo = "terraform-plugin-docs";
rev = "refs/tags/v${version}";
sha256 = "sha256-5vbi69GMgkzvN3aEQbNTbk99rg+kfvAvUrdDsuyIm9s=";
};

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

nativeBuildInputs = [ makeWrapper ];

subPackages = [
"cmd/tfplugindocs"
];

allowGoReference = true;

CGO_ENABLED = 0;

ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.commit=${src.rev}"
];

postInstall = ''
wrapProgram $out/bin/tfplugindocs --prefix PATH : ${lib.makeBinPath [ go ]}
'';

passthru = {
tests.version = testers.testVersion {
command = "tfplugindocs --version";
package = terraform-plugin-docs;
};
updateScript = nix-update-script { };
};

meta = with lib; {
description = "Generate and validate Terraform plugin/provider documentation";
homepage = "https://github.com/hashicorp/terraform-plugin-docs";
changelog = "https://github.com/hashicorp/terraform-plugin-docs/releases/tag/v${version}";
license = licenses.mpl20;
mainProgram = "tfplugindocs";
maintainers = with maintainers; [ lewo ];
};
}
22 changes: 0 additions & 22 deletions pkgs/development/tools/tfplugindocs/default.nix

This file was deleted.

1 change: 1 addition & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ mapAliases ({
telegram-cli = throw "telegram-cli was removed because it was broken and abandoned upstream"; # Added 2023-07-28
tensile = throw "'tensile' has been replaced with 'rocmPackages.tensile'"; # Added 2023-10-08
testVersion = testers.testVersion; # Added 2022-04-20
tfplugindocs = terraform-plugin-docs; # Added 2023-11-01
invalidateFetcherByDrvHash = testers.invalidateFetcherByDrvHash; # Added 2022-05-05
timescale-prometheus = promscale; # Added 2020-09-29
tinygltf = throw "TinyglTF has been embedded in draco due to lack of other users and compatibility breaks."; # Added 2023-06-25
Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2057,8 +2057,6 @@ with pkgs;

tfk8s = callPackage ../tools/misc/tfk8s { };

tfplugindocs = callPackage ../development/tools/tfplugindocs { };

thumbs = callPackage ../tools/misc/thumbs { };

tnat64 = callPackage ../tools/networking/tnat64 { };
Expand Down

0 comments on commit d9493be

Please sign in to comment.