1{ lib
2, buildGoModule
3, fetchFromGitHub
4}:
5
6buildGoModule rec {
7 pname = "gomplate";
8 version = "3.11.5";
9
10 src = fetchFromGitHub {
11 owner = "hairyhenderson";
12 repo = pname;
13 rev = "refs/tags/v${version}";
14 hash = "sha256-cBSOfjU7A6B7+5zQLGtGLx9kORsjH/IzGgkjwjjTcYY=";
15 };
16
17 vendorHash = "sha256-thsa15CDD7+gCSPSU4xDbovETREeuL4gV6TjdcImj9w=";
18
19 postPatch = ''
20 # some tests require network access
21 rm net/net_test.go \
22 internal/tests/integration/datasources_blob_test.go \
23 internal/tests/integration/datasources_git_test.go
24 # some tests rely on external tools we'd rather not depend on
25 rm internal/tests/integration/datasources_consul_test.go \
26 internal/tests/integration/datasources_vault*_test.go
27 '';
28
29 # TestInputDir_RespectsUlimit
30 preCheck = ''
31 ulimit -n 1024
32 '';
33
34 ldflags = [
35 "-s"
36 "-w"
37 "-X github.com/${src.owner}/${pname}/v3/version.Version=${version}"
38 ];
39
40 meta = with lib; {
41 description = "A flexible commandline tool for template rendering";
42 homepage = "https://gomplate.ca/";
43 changelog = "https://github.com/hairyhenderson/gomplate/releases/tag/v${version}";
44 license = licenses.mit;
45 maintainers = with maintainers; [ ris jlesquembre ];
46 };
47}