depot/third_party/nixpkgs/pkgs/development/tools/bingo/default.nix
Default email 22017988c6 Project import generated by Copybara.
GitOrigin-RevId: c777cdf5c564015d5f63b09cc93bef4178b19b01
2022-04-27 11:35:20 +02:00

43 lines
1.1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, bingo }:
buildGoModule rec {
pname = "bingo";
version = "0.6.0";
src = fetchFromGitHub {
owner = "bwplotka";
repo = "bingo";
rev = "v${version}";
sha256 = "sha256-t2nkY+mwek2NcbCwCkI3Mc1ULEJIjatBjChBdnKFAg8=";
};
vendorSha256 = "sha256-TCbwIHDg2YaLIscCoGPRBv5G3YSJ+qn/koOjPh+KKRY=";
patches = [
# Do not execute `go` command when invoking `bingo version`.
./version_go.patch
# Specific to v0.6.0. `v0.6` -> `v0.6.0`
./bingo_version.patch
];
postPatch = ''
rm get_e2e_test.go get_e2e_utils_test.go
'';
CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];
passthru.tests.version = testers.testVersion {
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 ];
};
}