nixpkgs/pkgs/applications/networking/cluster/terraform-docs/default.nix

27 lines
732 B
Nix
Raw Normal View History

2018-12-06 11:10:36 +00:00
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "${pname}-${version}";
pname = "terraform-docs";
2019-01-18 17:04:46 +00:00
version = "0.6.0";
2018-12-06 11:10:36 +00:00
goPackagePath = "github.com/segmentio/${pname}";
src = fetchFromGitHub {
owner = "segmentio";
repo = pname;
rev = "v${version}";
2019-01-18 17:04:46 +00:00
sha256 = "1p6prhjf82qnhf1zwl9h92j4ds5g383a6g9pwwnqbc3wdwy5zx7d";
2018-12-06 11:10:36 +00:00
};
preBuild = ''
buildFlagsArray+=("-ldflags" "-X main.version=${version}")
'';
meta = with lib; {
description = "A utility to generate documentation from Terraform modules in various output formats";
homepage = "https://github.com/segmentio/terraform-docs/";
license = licenses.mit;
maintainers = with maintainers; [ zimbatm ];
};
}