2023-12-29 22:12:02 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, testers
|
|
|
|
, mockgen
|
|
|
|
}:
|
2022-04-25 20:56:49 +00:00
|
|
|
|
2020-06-22 12:50:31 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "mockgen";
|
2023-12-29 22:12:02 +00:00
|
|
|
version = "0.4.0";
|
2022-04-25 20:56:49 +00:00
|
|
|
|
2020-06-22 12:50:31 +00:00
|
|
|
src = fetchFromGitHub {
|
2023-12-29 22:12:02 +00:00
|
|
|
owner = "uber-go";
|
2020-06-22 12:50:31 +00:00
|
|
|
repo = "mock";
|
|
|
|
rev = "v${version}";
|
2023-12-29 22:12:02 +00:00
|
|
|
sha256 = "sha256-3nt70xrZisK5vgQa+STZPiY4F9ITKw8PbBWcKoBn4Vc=";
|
2020-06-22 12:50:31 +00:00
|
|
|
};
|
2020-08-04 00:26:27 +00:00
|
|
|
|
2023-12-29 22:12:02 +00:00
|
|
|
vendorHash = "sha256-mcNVud2jzvlPPQEaar/eYZkP71V2Civz+R5v10+tewA=";
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
2020-08-04 00:26:27 +00:00
|
|
|
|
2020-06-22 12:50:31 +00:00
|
|
|
subPackages = [ "mockgen" ];
|
|
|
|
|
2023-12-29 22:12:02 +00:00
|
|
|
ldflags = [
|
|
|
|
"-X=main.version=${version}"
|
|
|
|
"-X=main.date=1970-01-01T00:00:00Z"
|
|
|
|
"-X=main.commit=unknown"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = mockgen;
|
|
|
|
command = "mockgen -version";
|
|
|
|
version = ''
|
|
|
|
v${version}
|
|
|
|
Commit: unknown
|
|
|
|
Date: 1970-01-01T00:00:00Z
|
|
|
|
'';
|
|
|
|
};
|
2022-04-25 20:56:49 +00:00
|
|
|
|
2020-06-22 12:50:31 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "GoMock is a mocking framework for the Go programming language";
|
2023-12-29 22:12:02 +00:00
|
|
|
homepage = "https://github.com/uber-go/mock";
|
|
|
|
changelog = "https://github.com/uber-go/mock/blob/v${version}/CHANGELOG.md";
|
2020-06-22 12:50:31 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ bouk ];
|
2023-12-29 22:12:02 +00:00
|
|
|
mainProgram = "mockgen";
|
2020-06-22 12:50:31 +00:00
|
|
|
};
|
|
|
|
}
|