2023-11-04 11:32:59 +00:00
|
|
|
# Gomplate 3.x does not build with go > 1.20.
|
|
|
|
# Version 4 of gomplate (yet unreleased) should not have this issue.
|
|
|
|
#
|
|
|
|
# see https://github.com/hairyhenderson/gomplate/issues/1872
|
|
|
|
|
2023-03-02 09:33:47 +00:00
|
|
|
{ lib
|
2023-11-04 11:32:59 +00:00
|
|
|
#, buildGoModule
|
|
|
|
, buildGo120Module
|
2023-03-02 09:33:47 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-10-02 16:05:11 +00:00
|
|
|
|
2023-11-04 11:32:59 +00:00
|
|
|
# buildGoModule rec {
|
|
|
|
buildGo120Module rec {
|
2020-10-02 16:05:11 +00:00
|
|
|
pname = "gomplate";
|
2024-01-23 07:39:39 +00:00
|
|
|
version = "3.11.7";
|
2020-10-02 16:05:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-03-02 09:33:47 +00:00
|
|
|
owner = "hairyhenderson";
|
2020-10-02 16:05:11 +00:00
|
|
|
repo = pname;
|
2023-03-02 09:33:47 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-23 07:39:39 +00:00
|
|
|
hash = "sha256-0cYQ44SF8fQ5Ml0tRUbqTFZ+zDVTV6elox1q6tNsG7Q=";
|
2020-10-02 16:05:11 +00:00
|
|
|
};
|
|
|
|
|
2024-01-23 07:39:39 +00:00
|
|
|
vendorHash = "sha256-8siITXKIqDbph/74aBEvkbLVqHE30VyRompFL6z92zA=";
|
2020-10-02 16:05:11 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2022-04-10 16:23:45 +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-02 16:05:11 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-09 08:50:38 +00:00
|
|
|
# TestInputDir_RespectsUlimit
|
|
|
|
preCheck = ''
|
|
|
|
ulimit -n 1024
|
|
|
|
'';
|
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [
|
2020-10-02 16:05:11 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
2023-03-02 09:33:47 +00:00
|
|
|
"-X github.com/${src.owner}/${pname}/v3/version.Version=${version}"
|
2020-10-02 16:05:11 +00:00
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-02 16:05:11 +00:00
|
|
|
description = "A flexible commandline tool for template rendering";
|
|
|
|
homepage = "https://gomplate.ca/";
|
2023-03-02 09:24:44 +00:00
|
|
|
changelog = "https://github.com/hairyhenderson/gomplate/releases/tag/v${version}";
|
2020-10-02 16:05:11 +00:00
|
|
|
license = licenses.mit;
|
2023-03-02 09:24:44 +00:00
|
|
|
maintainers = with maintainers; [ ris jlesquembre ];
|
2020-10-02 16:05:11 +00:00
|
|
|
};
|
|
|
|
}
|