2022-04-27 09:35:20 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, testers, bingo }:
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "bingo";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.6.0";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bwplotka";
|
|
|
|
repo = "bingo";
|
|
|
|
rev = "v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-t2nkY+mwek2NcbCwCkI3Mc1ULEJIjatBjChBdnKFAg8=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
vendorSha256 = "sha256-TCbwIHDg2YaLIscCoGPRBv5G3YSJ+qn/koOjPh+KKRY=";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Do not execute `go` command when invoking `bingo version`.
|
|
|
|
./version_go.patch
|
2022-04-27 09:35:20 +00:00
|
|
|
# Specific to v0.6.0. `v0.6` -> `v0.6.0`
|
|
|
|
./bingo_version.patch
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm get_e2e_test.go get_e2e_utils_test.go
|
|
|
|
'';
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2022-02-20 05:27:41 +00:00
|
|
|
package = bingo;
|
|
|
|
command = "bingo version";
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Like `go get` but for Go tools! CI Automating versioning of Go binaries in a nested, isolated Go modules.";
|
|
|
|
homepage = "https://github.com/bwplotka/bingo";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ aaronjheng ];
|
|
|
|
};
|
|
|
|
}
|