2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gomplate";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "3.10.0";
|
2020-10-07 09:15:18 +00:00
|
|
|
owner = "hairyhenderson";
|
|
|
|
rev = "v${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit owner rev;
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "0dbi9saxbwcvypxc0s656ln9zq2vysx8dhrcz488nmy6rcpqiiah";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
vendorSha256 = "0rvki8ghlbbaqgnjfsbs1jswj08jfzmnz9ilynv2c6kfkx9zs108";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
# some tests require network access
|
|
|
|
rm net/net_test.go \
|
|
|
|
internal/tests/integration/datasources_blob_test.go \
|
|
|
|
internal/tests/integration/datasources_git_test.go
|
|
|
|
# some tests rely on external tools we'd rather not depend on
|
|
|
|
rm internal/tests/integration/datasources_consul_test.go \
|
|
|
|
internal/tests/integration/datasources_vault*_test.go
|
2020-10-07 09:15:18 +00:00
|
|
|
'';
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
2020-10-07 09:15:18 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/${owner}/${pname}/v3/version.Version=${rev}"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-07 09:15:18 +00:00
|
|
|
description = "A flexible commandline tool for template rendering";
|
|
|
|
homepage = "https://gomplate.ca/";
|
|
|
|
maintainers = with maintainers; [ ris jlesquembre ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|