2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
2024-02-29 20:09:43 +00:00
|
|
|
, buildGoModule
|
2023-03-04 12:14:45 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
buildGoModule rec {
|
2020-10-07 09:15:18 +00:00
|
|
|
pname = "gomplate";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.1.0";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-03-04 12:14:45 +00:00
|
|
|
owner = "hairyhenderson";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "gomplate";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-shbG0q86wlSjoCK2K7hNdUCwNPiQp94GWQJ1e71A1T0=";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-UKqSKypAm6gt2JUCZh/DyfWo8uJeMp0M+4FiqwzzHIA=";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-X github.com/${src.owner}/${pname}/v4/version.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
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 \
|
2024-09-19 14:19:46 +00:00
|
|
|
internal/tests/integration/datasources_git_test.go \
|
|
|
|
render_test.go
|
2022-04-27 09:35:20 +00:00
|
|
|
# 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
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm $out/bin/gen
|
2022-08-12 12:06:08 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Flexible commandline tool for template rendering";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gomplate";
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://gomplate.ca/";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/hairyhenderson/gomplate/releases/tag/v${version}";
|
2020-10-07 09:15:18 +00:00
|
|
|
license = licenses.mit;
|
2023-03-04 12:14:45 +00:00
|
|
|
maintainers = with maintainers; [ ris jlesquembre ];
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
}
|