nixpkgs/pkgs/development/tools/gomplate/default.nix

35 lines
782 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub }:
2020-10-02 16:05:11 +00:00
buildGoModule rec {
pname = "gomplate";
2021-01-29 03:24:50 +00:00
version = "3.9.0";
2020-10-02 16:05:11 +00:00
owner = "hairyhenderson";
rev = "v${version}";
src = fetchFromGitHub {
inherit owner rev;
repo = pname;
2021-01-29 03:24:50 +00:00
sha256 = "sha256-liy8cqn+hWoTOHchCY1LLu23tNvz7eGA+AN0d0APjC4=";
2020-10-02 16:05:11 +00:00
};
2021-01-29 03:24:50 +00:00
vendorSha256 = "sha256-Ph9z/Tom7O7V7yZ/On+etty+Bl653HiY/J3d3yfweeQ=";
2020-10-02 16:05:11 +00:00
# some tests require network access
postPatch = ''
rm net/net_test.go
'';
2021-08-26 06:45:51 +00:00
ldflags = [
2020-10-02 16:05:11 +00:00
"-s"
"-w"
"-X github.com/${owner}/${pname}/v3/version.Version=${rev}"
];
meta = with lib; {
2020-10-02 16:05:11 +00:00
description = "A flexible commandline tool for template rendering";
homepage = "https://gomplate.ca/";
maintainers = with maintainers; [ ris jlesquembre ];
license = licenses.mit;
};
}